akka - How to provide subscriber with routing capability -
i have following path stream -
kafkastream[message] -> kafkastream[message] -> mergedkafkastream[message] -> stream[enrichedmessage] -> i/o kafkastream[message] ->
i not sure how write in akka stream way. tried following (pseudo).
kafkastream extends actorpublisher[message] { } iohandler extends actorsubscriber { }
k1, k2, k3 kafka streams publishers
f = flow[message].map(_.enrichmessage) flowgraph { b => k1 ~> merge k2 ~> merge k3 ~> merge merge ~> f ~> iohandlersink }
so way connect publisher sink. here problem want resolve slow io. iohandler actor slow processing message, how can have multiple iohandlers , should able distribute tasks. , want maintain pressure not using fire , forget using router.
i new akka stream, suggest me way out.
thanks
you can route multiple iohandler
sinks using balance
junction in flowgraph
.
Comments
Post a Comment