Class RedisOffsetBackingStore

java.lang.Object
org.apache.kafka.connect.storage.MemoryOffsetBackingStore
io.debezium.storage.redis.offset.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 Field PROP_ADDRESS
    • PROP_SSL_ENABLED

      public static final Field PROP_SSL_ENABLED
    • PROP_USER

      public static final Field PROP_USER
    • PROP_PASSWORD

      public static final Field PROP_PASSWORD
    • DEFAULT_REDIS_KEY_NAME

      public static final String DEFAULT_REDIS_KEY_NAME
      See Also:
    • PROP_KEY_NAME

      public static final Field PROP_KEY_NAME
    • DEFAULT_RETRY_INITIAL_DELAY

      public static final Integer DEFAULT_RETRY_INITIAL_DELAY
    • PROP_RETRY_INITIAL_DELAY

      public static final Field PROP_RETRY_INITIAL_DELAY
    • DEFAULT_RETRY_MAX_DELAY

      public static final Integer DEFAULT_RETRY_MAX_DELAY
    • PROP_RETRY_MAX_DELAY

      public static final Field PROP_RETRY_MAX_DELAY
    • DEFAULT_CONNECTION_TIMEOUT

      public static final Integer DEFAULT_CONNECTION_TIMEOUT
    • PROP_CONNECTION_TIMEOUT

      public static final Field PROP_CONNECTION_TIMEOUT
    • DEFAULT_SOCKET_TIMEOUT

      public static final Integer DEFAULT_SOCKET_TIMEOUT
    • PROP_SOCKET_TIMEOUT

      public static final Field PROP_SOCKET_TIMEOUT
    • DEFAULT_WAIT_ENABLED

      private static final boolean DEFAULT_WAIT_ENABLED
      See Also:
    • PROP_WAIT_ENABLED

      private static final Field PROP_WAIT_ENABLED
    • DEFAULT_WAIT_TIMEOUT

      private static final long DEFAULT_WAIT_TIMEOUT
      See Also:
    • PROP_WAIT_TIMEOUT

      private static final Field PROP_WAIT_TIMEOUT
    • DEFAULT_WAIT_RETRY_ENABLED

      private static final boolean DEFAULT_WAIT_RETRY_ENABLED
      See Also:
    • PROP_WAIT_RETRY_ENABLED

      private static final Field PROP_WAIT_RETRY_ENABLED
    • DEFAULT_WAIT_RETRY_DELAY

      private static final long DEFAULT_WAIT_RETRY_DELAY
      See Also:
    • PROP_WAIT_RETRY_DELAY

      private static final Field PROP_WAIT_RETRY_DELAY
    • redisKeyName

      private String redisKeyName
    • address

      private String address
    • user

      private String user
    • password

      private String password
    • sslEnabled

      private boolean sslEnabled
    • client

      private RedisClient client
    • config

      private Map<String,String> config
    • initialRetryDelay

      private Integer initialRetryDelay
    • maxRetryDelay

      private Integer maxRetryDelay
    • connectionTimeout

      private Integer connectionTimeout
    • socketTimeout

      private Integer socketTimeout
    • waitEnabled

      private boolean waitEnabled
    • waitTimeout

      private long waitTimeout
    • waitRetryEnabled

      private boolean waitRetryEnabled
    • waitRetryDelay

      private long waitRetryDelay
  • 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