Configuration object to set up a logical replication service.

Hierarchy

  • LogicalReplicationServiceConfig

Properties

connectionString: string
logger?: DbLogger

Produces logs during the logical replication service runtime. If not passed, console logs are used instead.

Decides how to react to detected table changes.

operationsToWatch?: LogicalReplicationOperation[]

An array of operations that will be handled and redirected to the messageHandler. Other operations will be skipped, each producing a TRACE log.

publicationNames: string[]

Array of publication names for tables which changes would be watched. Must be defined beforehand on database level, e.g. using ensureReplicationSlotAndPublicationExist

reconnectionIntervalInMs?: number

When logical replication service establishes a connection with a replication slot - it can already be in use, e.g. by another instance of the service. The logical replication service will then try to reconnect once every 10 seconds for a total duration of 5 minutes.

After the first 5 minutes, the delay of reconnection attempts will be increased from 10 seconds to the value of this parameter. Default value is 300000 (every 5 minutes).

replicationSlotName: string

Name of the replication slot which will be streaming table changes. Must be defined beforehand on database level, e.g. using ensureReplicationSlotAndPublicationExist

Generated using TypeDoc