Messages
Reference for Sequin’s CDC messages.
Sequin converts Postgres changes into JSON messages that are delivered to your sinks. Each message contains the current record, any previous values, the action that occurred, and metadata about the event.
You can apply a transform to the message to modify the data before it is delivered to your sink.
The current state of the row. Contains all column values.
For update
operations, contains the previous values of changed fields. For insert
and delete
operations, this field is null.
The type of change that occurred. One of:
insert
: A new row was createdupdate
: An existing row was modifieddelete
: A row was deletedread
: A row was read during a backfill
Additional context about the change.
Idempotency
The metadata
of each message includes an idempotency_key
which your application can use to reject any possible duplicate messages.
For regular changes (non-backfill), the idempotency key is based on the transaction’s position in the database log and its position within that transaction.
For backfill messages, the key is based on the backfill’s unique identifier and the primary key values of the record being processed.
Related
Transforms
Learn how to transform payloads before they are sent to your destination.
Filters
Learn how to filter messages before they are sent to your destination.
Routing
Learn how to route messages to different sinks based on their content.
Backfills
Learn how to backfill data from your database to your sinks.