Class FlinkOffsetBackingStore

  • All Implemented Interfaces:
    org.apache.kafka.connect.storage.OffsetBackingStore

    public class FlinkOffsetBackingStore
    extends Object
    implements org.apache.kafka.connect.storage.OffsetBackingStore
    A implementation of OffsetBackingStore backed on Flink's state mechanism.

    The OFFSET_STATE_VALUE in the WorkerConfig is the raw position and offset data in JSON format. It is set into the config when recovery from failover by DebeziumSourceFunction before startup the DebeziumEngine. If it is not a restoration, the OFFSET_STATE_VALUE is empty. DebeziumEngine relies on the OffsetBackingStore for failover recovery.

    See Also:
    DebeziumSourceFunction
    • Constructor Detail

      • FlinkOffsetBackingStore

        public FlinkOffsetBackingStore()
    • Method Detail

      • configure

        public void configure​(org.apache.kafka.connect.runtime.WorkerConfig config)
        Specified by:
        configure in interface org.apache.kafka.connect.storage.OffsetBackingStore
      • start

        public void start()
        Specified by:
        start in interface org.apache.kafka.connect.storage.OffsetBackingStore
      • stop

        public void stop()
        Specified by:
        stop in interface org.apache.kafka.connect.storage.OffsetBackingStore
      • set

        public Future<Void> set​(Map<ByteBuffer,​ByteBuffer> values,
                                org.apache.kafka.connect.util.Callback<Void> callback)
        Specified by:
        set in interface org.apache.kafka.connect.storage.OffsetBackingStore