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 Summary
Fields Modifier and Type Field Description private booleancontainsMetadataprivate DateTimeFormatdateTimeprivate static org.slf4j.LoggerLOGGER
-
Constructor Summary
Constructors Constructor Description NonStreamingWal2JsonMessageDecoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilderoptionsWithMetadata(org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilder builder)Allows MessageDecoder to configure options with which the replication stream is started.org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilderoptionsWithoutMetadata(org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilder builder)Allows MessageDecoder to configure options with which the replication stream is started.voidprocessNotEmptyMessage(ByteBuffer buffer, ReplicationStream.ReplicationMessageProcessor processor, TypeRegistry typeRegistry)voidsetContainsMetadata(boolean containsMetadata)Signals to this decoder whether messages contain type metadata or not.-
Methods inherited from class io.debezium.connector.postgresql.connection.AbstractMessageDecoder
close, processMessage, shouldMessageBeSkipped
-
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
dateTime
private final DateTimeFormat dateTime
-
containsMetadata
private boolean containsMetadata
-
-
Method Detail
-
processNotEmptyMessage
public void processNotEmptyMessage(ByteBuffer buffer, ReplicationStream.ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException
- Specified by:
processNotEmptyMessagein classAbstractMessageDecoder- Throws:
SQLExceptionInterruptedException
-
optionsWithMetadata
public org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilder optionsWithMetadata(org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilder builder)
Description copied from interface:MessageDecoderAllows 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)
Description copied from interface:MessageDecoderAllows 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:MessageDecoderSignals to this decoder whether messages contain type metadata or not.
-
-