Interface KafkaClientSupplier


public interface KafkaClientSupplier
KafkaClientSupplier can be used to provide custom Kafka clients to a KafkaStreams instance.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default org.apache.kafka.clients.admin.Admin
    Create an Admin which is used for internal topic management.
    org.apache.kafka.clients.consumer.Consumer<byte[],byte[]>
    Create a Consumer which is used to read records of source topics.
    org.apache.kafka.clients.consumer.Consumer<byte[],byte[]>
    Create a Consumer which is used to consume records for GlobalKTable.
    org.apache.kafka.clients.producer.Producer<byte[],byte[]>
    Create a Producer which is used to write records to sink topics.
    org.apache.kafka.clients.consumer.Consumer<byte[],byte[]>
    Create a Consumer which is used to read records to restore StateStores.
  • Method Details

    • getAdmin

      default org.apache.kafka.clients.admin.Admin getAdmin(Map<String,Object> config)
      Create an Admin which is used for internal topic management.
      Parameters:
      config - Supplied by the Properties given to the KafkaStreams
      Returns:
      an instance of Admin
    • getProducer

      org.apache.kafka.clients.producer.Producer<byte[],byte[]> getProducer(Map<String,Object> config)
      Create a Producer which is used to write records to sink topics.
      Parameters:
      config - producer config which is supplied by the Properties given to the KafkaStreams instance
      Returns:
      an instance of Kafka producer
    • getConsumer

      org.apache.kafka.clients.consumer.Consumer<byte[],byte[]> getConsumer(Map<String,Object> config)
      Create a Consumer which is used to read records of source topics.
      Parameters:
      config - consumer config which is supplied by the Properties given to the KafkaStreams instance
      Returns:
      an instance of Kafka consumer
    • getRestoreConsumer

      org.apache.kafka.clients.consumer.Consumer<byte[],byte[]> getRestoreConsumer(Map<String,Object> config)
      Create a Consumer which is used to read records to restore StateStores.
      Parameters:
      config - restore consumer config which is supplied by the Properties given to the KafkaStreams
      Returns:
      an instance of Kafka consumer
    • getGlobalConsumer

      org.apache.kafka.clients.consumer.Consumer<byte[],byte[]> getGlobalConsumer(Map<String,Object> config)
      Create a Consumer which is used to consume records for GlobalKTable.
      Parameters:
      config - global consumer config which is supplied by the Properties given to the KafkaStreams
      Returns:
      an instance of Kafka consumer