Class NonStreamingWal2JsonMessageDecoder
java.lang.Object
io.debezium.connector.postgresql.connection.AbstractMessageDecoder
io.debezium.connector.postgresql.connection.wal2json.NonStreamingWal2JsonMessageDecoder
- All Implemented Interfaces:
MessageDecoder
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
FieldsModifier and TypeFieldDescriptionprivate booleanprivate final DateTimeFormatprivate static final org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilderoptionsWithMetadata(org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilder builder, Function<Integer, Boolean> hasMinimumServerVersion) 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, Function<Integer, Boolean> hasMinimumServerVersion) 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 Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
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:
processNotEmptyMessagein classAbstractMessageDecoder- Throws:
SQLExceptionInterruptedException
-
optionsWithMetadata
public org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilder optionsWithMetadata(org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilder builder, Function<Integer, Boolean> hasMinimumServerVersion) 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, Function<Integer, Boolean> hasMinimumServerVersion) 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.
-