1

I need to create streams application in Spring Boot with dynamically generated output topics. I get a list of branch_ids from an external source and have to branch if the record has a branch_id in that list.

Example: List received from external source branch_ids= {1,3,4,5,6...}

record 1: {'branch_id: 1', 'item: Samsung galaxy a21 ultra', 'department: sales'}
record 2: {'branch_id: 2', 'item: Samsung galaxy a72', 'department: sales'}
record 3: {'branch_id: 3', 'item: Samsung galaxy a32', 'department: sales'}

Expected behaviour: Streams application branches and writes to output topics: branch_id_1

{'branch_id: 1', 'item: Samsung galaxy a21 ultra', 'department: sales'}

and branch_id_3

record 3: {'branch_id: 3', 'item: Samsung galaxy a32', 'department: sales'}

while skipping the record with branch_id 2 because it is not in the list.

Is there a better performing choice of dependencies when dynamically branching to more than 100 output topics from a single input topic? I made streams application in Spring Boot using spring-kafka and wondering if spring-cloud-stream-binder-Kafka performs worse? I even tried creating a apache-kafka-client only application in Spring Boot but StreamsBuilder doesn't work with spring boot without spring-kafka dependency it seems.

Should I go for spring-cloud-stream-binder-kafka or spring-kafka?

Which would be easier to implement?

camel38
  • 79
  • 1
  • 10

0 Answers0