Package org.apache.kafka.streams
Interface KafkaClientSupplier
-
public interface KafkaClientSupplierKafkaClientSuppliercan be used to provide custom Kafka clients to aKafkaStreamsinstance.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default AdmingetAdmin(Map<String,Object> config)Create anAdminwhich is used for internal topic management.default AdminClientgetAdminClient(Map<String,Object> config)Deprecated.Not called by Kafka Streams, which now usesgetAdmin(java.util.Map<java.lang.String, java.lang.Object>)instead.Consumer<byte[],byte[]>getConsumer(Map<String,Object> config)Create aConsumerwhich is used to read records of source topics.Consumer<byte[],byte[]>getGlobalConsumer(Map<String,Object> config)Create aConsumerwhich is used to consume records forGlobalKTable.Producer<byte[],byte[]>getProducer(Map<String,Object> config)Create aProducerwhich is used to write records to sink topics.Consumer<byte[],byte[]>getRestoreConsumer(Map<String,Object> config)Create aConsumerwhich is used to read records to restoreStateStores.
-
-
-
Method Detail
-
getAdminClient
@Deprecated default AdminClient getAdminClient(Map<String,Object> config)
Deprecated.Not called by Kafka Streams, which now usesgetAdmin(java.util.Map<java.lang.String, java.lang.Object>)instead.Create anAdminClientwhich is used for internal topic management.- Parameters:
config- Supplied by thePropertiesgiven to theKafkaStreams- Returns:
- an instance of
AdminClient
-
getAdmin
default Admin getAdmin(Map<String,Object> config)
Create anAdminwhich is used for internal topic management.- Parameters:
config- Supplied by thePropertiesgiven to theKafkaStreams- Returns:
- an instance of
Admin
-
getProducer
Producer<byte[],byte[]> getProducer(Map<String,Object> config)
Create aProducerwhich is used to write records to sink topics.- Parameters:
config-producer configwhich is supplied by thePropertiesgiven to theKafkaStreamsinstance- Returns:
- an instance of Kafka producer
-
getConsumer
Consumer<byte[],byte[]> getConsumer(Map<String,Object> config)
Create aConsumerwhich is used to read records of source topics.- Parameters:
config-consumer configwhich is supplied by thePropertiesgiven to theKafkaStreamsinstance- Returns:
- an instance of Kafka consumer
-
getRestoreConsumer
Consumer<byte[],byte[]> getRestoreConsumer(Map<String,Object> config)
Create aConsumerwhich is used to read records to restoreStateStores.- Parameters:
config-restore consumer configwhich is supplied by thePropertiesgiven to theKafkaStreams- Returns:
- an instance of Kafka consumer
-
getGlobalConsumer
Consumer<byte[],byte[]> getGlobalConsumer(Map<String,Object> config)
Create aConsumerwhich is used to consume records forGlobalKTable.- Parameters:
config-global consumer configwhich is supplied by thePropertiesgiven to theKafkaStreams- Returns:
- an instance of Kafka consumer
-
-