akka-persistence-kafka icon indicating copy to clipboard operation
akka-persistence-kafka copied to clipboard

Ability to tie a persistent actor to a specific partition of a topic

Open dspangen opened this issue 10 years ago • 3 comments

Use case is the following: an Akka application implementing event sourcing performs sharding internally before persisting events. Such sharding would occur at a single actor with a fanout; messages could then be sent along to a set of PersistentActors, one for each partition of a topic. This would allow external consumption of a partitioned topic when events are captured in an akka application.

dspangen avatar Jul 16 '14 18:07 dspangen

Just out of curiosity: Does anyone foresee any major design issues with implementing this feature or is it just a matter of time?

aosagie avatar May 23 '15 23:05 aosagie

This would require a persistenceId -> (topic, partition) mapping, for example, using a naming convention for persistenceIds such as my_topic_0, my_topic_1and so on. Shouldn't be a big deal to implement. Pull requests are welcome :smile:

krasserm avatar May 25 '15 06:05 krasserm

Has anyone thought about this more? I am trying to wrap my head around how you get around this limit of topics. As a side note, partitions and topics are roughly equal in resource usage to Kafka. So a high amount of either doesn't work well.

dispalt avatar Aug 19 '15 20:08 dispalt