sclasen / akka-kafka

185 stars 62 forks source link

Multiple workers actors #50

Open eugenemiretsky opened 8 years ago

eugenemiretsky commented 8 years ago

There are many stream consumer actors created (FSMStreams), but only one worker actor - this essentially turns any non-trivial worker into a bottle neck - would it make sense to have a consumer actor per stream?

sclasen commented 8 years ago

You only need provide an ActorRef to any of the Consumers in this library. They can be backed by a standard actor or any of the existing akka routers or other pooling mechanism.

In addition the actor ref provided to this library doesnt necessarily need to be the actor that is sending the StreamFSM.Processed acknowledgements back to the consumer, any actor that gets forwarded a message from the consumer can respond to it. (Assuming sender is properly maintained across forwarding)

Is there another requirement you have that is not met here?

Cheers!