Class KafkaSignalThread<T extends io.debezium.spi.schema.DataCollectionId>

java.lang.Object
io.debezium.connector.mysql.signal.KafkaSignalThread<T>

public class KafkaSignalThread<T extends io.debezium.spi.schema.DataCollectionId> extends Object
The class responsible for processing of signals delivered to Debezium via a dedicated Kafka topic. The signal message must have the following structure:
  • id STRING - the unique identifier of the signal sent, usually UUID, can be used for deduplication
  • type STRING - the unique logical name of the code executing the signal
  • data STRING - the data in JSON format that are passed to the signal code
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • signalTopicListenerExecutor

      private final ExecutorService signalTopicListenerExecutor
    • topicName

      private final String topicName
    • connectorName

      private final String connectorName
    • pollTimeoutMs

      private final Duration pollTimeoutMs
    • eventSource

      private final MySqlReadOnlyIncrementalSnapshotChangeEventSource<T extends io.debezium.spi.schema.DataCollectionId> eventSource
    • signalsConsumer

      private final org.apache.kafka.clients.consumer.KafkaConsumer<String,String> signalsConsumer
    • CONFIGURATION_FIELD_PREFIX_STRING

      public static final String CONFIGURATION_FIELD_PREFIX_STRING
      See Also:
    • CONSUMER_PREFIX

      private static final String CONSUMER_PREFIX
      See Also:
    • SIGNAL_TOPIC

      public static final Field SIGNAL_TOPIC
    • BOOTSTRAP_SERVERS

      public static final Field BOOTSTRAP_SERVERS
    • SIGNAL_POLL_TIMEOUT_MS

      public static final Field SIGNAL_POLL_TIMEOUT_MS
  • Constructor Details

  • Method Details

    • start

      public void start()
    • monitorSignals

      private void monitorSignals()
    • processSignal

      private void processSignal(org.apache.kafka.clients.consumer.ConsumerRecord<String,String> record) throws IOException, InterruptedException
      Throws:
      IOException
      InterruptedException
    • executeSnapshot

      private void executeSnapshot(Document data, long signalOffset)
    • executeStopSnapshot

      private void executeStopSnapshot(Document data, long signalOffset)
    • executePause

      private void executePause(Document data)
    • executeResume

      private void executeResume(Document data)
    • seek

      public void seek(long signalOffset)