Package io.debezium.pipeline.signal
Class Signal<P extends Partition>
java.lang.Object
io.debezium.pipeline.signal.Signal<P>
The class responsible for processing of signals delivered to Debezium via a dedicated signaling table.
The processor supports a common set of signals that it can process and every connector can register its own
additional signals.
The signalling table must conform to the structure
id STRING
- the unique identifier of the signal sent, usually UUID, can be used for deduplicationtype STRING
- the unique logical name of the code executing the signaldata STRING
- the data in JSON format that are passed to the signal code
- Author:
- Jiri Pechanec
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Signal.Action<P extends Partition>
static class
Signal.Payload<P extends Partition>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final CommonConnectorConfig
private static final org.slf4j.Logger
private final Map<String,
Signal.Action<P>> -
Constructor Summary
ConstructorDescriptionSignal
(CommonConnectorConfig connectorConfig) Signal
(CommonConnectorConfig connectorConfig, EventDispatcher<P, ? extends DataCollectionId> eventDispatcher) -
Method Summary
Modifier and TypeMethodDescriptionboolean
isSignal
(DataCollectionId dataCollectionId) boolean
boolean
process
(P partition, String id, String type, String data, OffsetContext offset, org.apache.kafka.connect.data.Struct source) boolean
process
(P partition, org.apache.kafka.connect.data.Struct value, OffsetContext offset) void
registerSignalAction
(String id, Signal.Action<P> signal)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
connectorConfig
-
signalActions
-
-
Constructor Details
-
Signal
public Signal(CommonConnectorConfig connectorConfig, EventDispatcher<P, ? extends DataCollectionId> eventDispatcher) -
Signal
Signal(CommonConnectorConfig connectorConfig)
-
-
Method Details
-
isSignal
-
registerSignalAction
-
process
public boolean process(P partition, String id, String type, String data, OffsetContext offset, org.apache.kafka.connect.data.Struct source) throws InterruptedException - Throws:
InterruptedException
-
process
public boolean process(P partition, String id, String type, String data) throws InterruptedException - Throws:
InterruptedException
-
process
public boolean process(P partition, org.apache.kafka.connect.data.Struct value, OffsetContext offset) throws InterruptedException - Parameters:
value
- Envelope with change from signaling tableoffset
- offset of the incoming signal- Returns:
- true if the signal was processed
- Throws:
InterruptedException
-