Package org.apache.kafka.streams
Interface KafkaClientSupplier
-
public interface KafkaClientSupplier
KafkaClientSupplier
can be used to provide custom Kafka clients to aKafkaStreams
instance.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default Admin
getAdmin(Map<String,Object> config)
Create anAdmin
which is used for internal topic management.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.Consumer<byte[],byte[]>
getConsumer(Map<String,Object> config)
Create aConsumer
which is used to read records of source topics.Consumer<byte[],byte[]>
getGlobalConsumer(Map<String,Object> config)
Create aConsumer
which is used to consume records forGlobalKTable
.Producer<byte[],byte[]>
getProducer(Map<String,Object> config)
Create aProducer
which is used to write records to sink topics.Consumer<byte[],byte[]>
getRestoreConsumer(Map<String,Object> config)
Create aConsumer
which is used to read records to restoreStateStore
s.
-
-
-
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 anAdminClient
which is used for internal topic management.- Parameters:
config
- Supplied by theProperties
given to theKafkaStreams
- Returns:
- an instance of
AdminClient
-
getAdmin
default Admin getAdmin(Map<String,Object> config)
Create anAdmin
which is used for internal topic management.- Parameters:
config
- Supplied by theProperties
given to theKafkaStreams
- Returns:
- an instance of
Admin
-
getProducer
Producer<byte[],byte[]> getProducer(Map<String,Object> config)
Create aProducer
which is used to write records to sink topics.- Parameters:
config
-producer config
which is supplied by theProperties
given to theKafkaStreams
instance- Returns:
- an instance of Kafka producer
-
getConsumer
Consumer<byte[],byte[]> getConsumer(Map<String,Object> config)
Create aConsumer
which is used to read records of source topics.- Parameters:
config
-consumer config
which is supplied by theProperties
given to theKafkaStreams
instance- Returns:
- an instance of Kafka consumer
-
getRestoreConsumer
Consumer<byte[],byte[]> getRestoreConsumer(Map<String,Object> config)
Create aConsumer
which is used to read records to restoreStateStore
s.- Parameters:
config
-restore consumer config
which is supplied by theProperties
given to theKafkaStreams
- Returns:
- an instance of Kafka consumer
-
getGlobalConsumer
Consumer<byte[],byte[]> getGlobalConsumer(Map<String,Object> config)
Create aConsumer
which is used to consume records forGlobalKTable
.- Parameters:
config
-global consumer config
which is supplied by theProperties
given to theKafkaStreams
- Returns:
- an instance of Kafka consumer
-
-