Class NonStreamingWal2JsonMessageDecoder

java.lang.Object
io.debezium.connector.postgresql.connection.AbstractMessageDecoder
io.debezium.connector.postgresql.connection.wal2json.NonStreamingWal2JsonMessageDecoder
All Implemented Interfaces:
MessageDecoder

public class NonStreamingWal2JsonMessageDecoder extends AbstractMessageDecoder
A non-streaming version of JSON deserialization of a message sent by wal2json logical decoding plugin. The plugin sends all changes in one transaction as a single batch in a big JSON file and they are passed to processor one-by-one.
Author:
Jiri Pechanec
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • dateTime

      private final DateTimeFormat dateTime
    • containsMetadata

      private boolean containsMetadata
  • Constructor Details

    • NonStreamingWal2JsonMessageDecoder

      public NonStreamingWal2JsonMessageDecoder()
  • Method Details

    • processNotEmptyMessage

      public void processNotEmptyMessage(ByteBuffer buffer, ReplicationStream.ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException
      Specified by:
      processNotEmptyMessage in class AbstractMessageDecoder
      Throws:
      SQLException
      InterruptedException
    • optionsWithMetadata

      public org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilder optionsWithMetadata(org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilder builder, Function<Integer,Boolean> hasMinimumServerVersion)
      Description copied from interface: MessageDecoder
      Allows MessageDecoder to configure options with which the replication stream is started. The messages CAN contain type metadata. See PostgreSQL command START_REPLICATION SLOT for more details.
      Returns:
      the builder instance
    • optionsWithoutMetadata

      public org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilder optionsWithoutMetadata(org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilder builder, Function<Integer,Boolean> hasMinimumServerVersion)
      Description copied from interface: MessageDecoder
      Allows MessageDecoder to configure options with which the replication stream is started. The messages MUST NOT contain type metadata. See PostgreSQL command START_REPLICATION SLOT for more details.
      Returns:
      the builder instance
    • setContainsMetadata

      public void setContainsMetadata(boolean containsMetadata)
      Description copied from interface: MessageDecoder
      Signals to this decoder whether messages contain type metadata or not.