Interface ReplicationMessage

All Known Implementing Classes:
LogicalDecodingMessage, PgOutputReplicationMessage, PgOutputTruncateReplicationMessage, PgProtoReplicationMessage, ReplicationMessage.NoopMessage, TransactionMessage

public interface ReplicationMessage
An abstract representation of a replication message that is sent by a PostgreSQL logical decoding plugin and is processed by the Debezium PostgreSQL connector.
Author:
Jiri Pechanec
  • Method Details

    • getOperation

      Returns:
      A data operation executed
    • getCommitTime

      Instant getCommitTime()
      Returns:
      Transaction commit time for this change
    • getTransactionId

      OptionalLong getTransactionId()
      Returns:
      An id of transaction to which this change belongs; will not be present for non-transactional logical decoding messages for instance
    • getTable

      String getTable()
      Returns:
      Table changed
    • getOldTupleList

      List<ReplicationMessage.Column> getOldTupleList()
      Returns:
      Set of original values of table columns, null for INSERT
    • getNewTupleList

      List<ReplicationMessage.Column> getNewTupleList()
      Returns:
      Set of new values of table columns, null for DELETE
    • isLastEventForLsn

      boolean isLastEventForLsn()
      Returns:
      true if this is the last message in the batch of messages with same LSN
    • shouldSchemaBeSynchronized

      default boolean shouldSchemaBeSynchronized()
      Returns:
      true if the stream producer should synchronize the schema when processing messages, false otherwise
    • isTransactionalMessage

      default boolean isTransactionalMessage()
      Whether this message represents the begin or end of a transaction.