Ram
Ram

Reputation: 731

How to send message from many topics to many topics using spring boot or spring Kafka integration

I am looking for multiple source to multiple destination topics message transfer. enter image description here

I can do iterate, list of destination topics and send one by one. But is there any simple, other than that approach.

Thank you!

Upvotes: 0

Views: 281

Answers (1)

Artem Bilan
Artem Bilan

Reputation: 121177

Sounds more like Kafka Streams scenario: https://docs.confluent.io/platform/current/streams/index.html.

See their StreamsBuilder.stream(final Collection<String> topics) and KStream.branch(final Predicate<? super K, ? super V>... predicates).

Here is a good example how to produce into several topics: https://github.com/nodefluent/kafka-streams/issues/85.

See also convenient KafkaStreamBrancher API in spring-kafka: https://docs.spring.io/spring-kafka/docs/current/reference/html/#using-kafkastreambrancher

Upvotes: 1

Related Questions