Home > Blockchain >  Dynamic Akka streams sink
Dynamic Akka streams sink

Time:04-19

I want to build a graph in Akka streams where the source is a Kafka topic (topic_a) and the sink is topic_b (always) and, depending on the message's data, also topic_c (the output message will be different than the output message that was sent to topic_b).

Is there any way to achieve this in Akka streams? Thanks!

CodePudding user response:

You need a graph like this one:

topicASource ~> broadcast               ~> topicBSink
                broadcast ~> filterFlow ~> topicCSink 

It can be easily created using graphs or simplified API.

  • Related