Class RedisOffsetBackingStore

java.lang.Object
org.apache.kafka.connect.storage.MemoryOffsetBackingStore
io.debezium.server.redis.RedisOffsetBackingStore
All Implemented Interfaces:
org.apache.kafka.connect.storage.OffsetBackingStore

public class RedisOffsetBackingStore extends org.apache.kafka.connect.storage.MemoryOffsetBackingStore
Implementation of OffsetBackingStore that saves to Redis
Author:
Oren Elias
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • CONFIGURATION_FIELD_PREFIX_STRING

      private static final String CONFIGURATION_FIELD_PREFIX_STRING
      See Also:
    • PROP_ADDRESS

      public static final io.debezium.config.Field PROP_ADDRESS
    • PROP_SSL_ENABLED

      public static final io.debezium.config.Field PROP_SSL_ENABLED
    • PROP_USER

      public static final io.debezium.config.Field PROP_USER
    • PROP_PASSWORD

      public static final io.debezium.config.Field PROP_PASSWORD
    • DEFAULT_REDIS_KEY_NAME

      public static final String DEFAULT_REDIS_KEY_NAME
      See Also:
    • PROP_KEY_NAME

      public static final io.debezium.config.Field PROP_KEY_NAME
    • DEFAULT_RETRY_INITIAL_DELAY

      public static final Integer DEFAULT_RETRY_INITIAL_DELAY
    • PROP_RETRY_INITIAL_DELAY

      public static final io.debezium.config.Field PROP_RETRY_INITIAL_DELAY
    • DEFAULT_RETRY_MAX_DELAY

      public static final Integer DEFAULT_RETRY_MAX_DELAY
    • PROP_RETRY_MAX_DELAY

      public static final io.debezium.config.Field PROP_RETRY_MAX_DELAY
    • SINK_PROP_PREFIX

      private static final String SINK_PROP_PREFIX
      See Also:
    • redisKeyName

      private String redisKeyName
    • address

      private String address
    • user

      private String user
    • password

      private String password
    • sslEnabled

      private boolean sslEnabled
    • client

      private redis.clients.jedis.Jedis client
    • config

      private Map<String,String> config
    • initialRetryDelay

      private Integer initialRetryDelay
    • maxRetryDelay

      private Integer maxRetryDelay
  • Constructor Details

    • RedisOffsetBackingStore

      public RedisOffsetBackingStore()
  • Method Details

    • connect

      void connect()
    • configure

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

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

      public void stop()
      Specified by:
      stop in interface org.apache.kafka.connect.storage.OffsetBackingStore
      Overrides:
      stop in class org.apache.kafka.connect.storage.MemoryOffsetBackingStore
    • load

      private void load()
      Load offsets from redis keys
    • save

      protected void save()
      Save offsets to redis keys
      Overrides:
      save in class org.apache.kafka.connect.storage.MemoryOffsetBackingStore