WalEx.Replication.Publisher (WalEx v4.8.0)

Copy Markdown View Source

GenServer that accumulates decoded pgoutput messages into transactions and hands the resulting WalEx.Changes.Transaction off to WalEx.Events.

Tracks the relation and type tables built up from Relation and Type messages so that subsequent Insert/Update/Delete messages can be hydrated into typed change records.

Summary

Functions

Returns a specification to start this module under a supervisor.

Casts a decoded replication message into the publisher (fire-and-forget).

Synchronously processes a decoded replication message; used by tests and synchronous middleware.

Starts the publisher GenServer registered under the app name.

Types

t()

@type t() :: %WalEx.Replication.Publisher{relations: map() | nil}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

process_message_async(message, app_name)

Casts a decoded replication message into the publisher (fire-and-forget).

process_message_sync(message, app_name)

Synchronously processes a decoded replication message; used by tests and synchronous middleware.

start_link(opts)

Starts the publisher GenServer registered under the app name.