Class KafkaStreamsBindingInformationCatalogue
java.lang.Object
org.springframework.cloud.stream.binder.kafka.streams.KafkaStreamsBindingInformationCatalogue
A catalogue that provides binding information for Kafka Streams target types such as
KStream. It also keeps a catalogue for the underlying
StreamsBuilderFactoryBean
and StreamsConfig associated with various
StreamListener methods in the
ApplicationContext.- Author:
- Soby Chacko
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDlqProducerFactory(org.springframework.kafka.config.StreamsBuilderFactoryBean streamsBuilderFactoryBean, org.springframework.kafka.core.ProducerFactory<byte[], byte[]> producerFactory) voidaddPreviousKafkaStreamsForApplicationId(String applicationId, org.apache.kafka.streams.KafkaStreams kafkaStreams) Caching the previous KafkaStreams for the applicaiton.id when binding is stopped through actuator.Map<org.springframework.kafka.config.StreamsBuilderFactoryBean,List<ConsumerProperties>> List<org.springframework.kafka.core.ProducerFactory<byte[],byte[]>> List<org.springframework.kafka.core.ProducerFactory<byte[],byte[]>> getDlqProducerFactory(org.springframework.kafka.config.StreamsBuilderFactoryBean streamsBuilderFactoryBean) Get all stopped KafkaStreams objects through actuator binding stop.voidremovePreviousKafkaStreamsForApplicationId(String applicationId) Remove the previously cached KafkaStreams object.
-
Constructor Details
-
KafkaStreamsBindingInformationCatalogue
public KafkaStreamsBindingInformationCatalogue()
-
-
Method Details
-
getConsumerPropertiesPerSbfb
public Map<org.springframework.kafka.config.StreamsBuilderFactoryBean,List<ConsumerProperties>> getConsumerPropertiesPerSbfb() -
getDlqProducerFactories
public List<org.springframework.kafka.core.ProducerFactory<byte[],byte[]>> getDlqProducerFactories() -
getDlqProducerFactory
public List<org.springframework.kafka.core.ProducerFactory<byte[],byte[]>> getDlqProducerFactory(org.springframework.kafka.config.StreamsBuilderFactoryBean streamsBuilderFactoryBean) -
addDlqProducerFactory
public void addDlqProducerFactory(org.springframework.kafka.config.StreamsBuilderFactoryBean streamsBuilderFactoryBean, org.springframework.kafka.core.ProducerFactory<byte[], byte[]> producerFactory) -
addPreviousKafkaStreamsForApplicationId
public void addPreviousKafkaStreamsForApplicationId(String applicationId, org.apache.kafka.streams.KafkaStreams kafkaStreams) Caching the previous KafkaStreams for the applicaiton.id when binding is stopped through actuator. See https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/1165- Parameters:
applicationId- application.idkafkaStreams-KafkaStreamsobject
-
removePreviousKafkaStreamsForApplicationId
Remove the previously cached KafkaStreams object. See https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/1165- Parameters:
applicationId- application.id
-
getStoppedKafkaStreams
Get all stopped KafkaStreams objects through actuator binding stop. See https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/1165- Returns:
- stopped KafkaStreams objects map
-