I want to start using akka projection in my project. I am using akka cluster and I’d like to use the ShardedDaemonProcess to distribute the load. Currently I have a database with ~million events that have not been tagged and as I understand it I need to tag my events in order to use the library.
Is there any way to process events that have not been tagged?
Then it should only be a a matter of adding the tag to the tags column in the journal table.
When using ShardedDaemonProcess you will use several tags to distribute the projection instances. It’s important that you use the same hashing mechanism in the db migration job as will later be used by your application.
Instead of the entityId you could use the persistenceId if you find that easier. You have the persistence_id in the table. Then you must also use the persistenceId in the EventSourcedBehavior tagging.
Yeah, that’s probably beyond what you can do with SQL. Alternatively you have some other hashing algorithm that you can do with SQL and then replicate that to Scala in the EventSourcedBehavior tagging.
Anyway, a few million rows shouldn’t be a problem to iterate from a Scala program.