Migrating an event sourced application to Akka Persistence and keeping timestamps

Hi!

We looking at Akka Persistence as a tool for developing an event sourced application to replace our existing legacy application. The existing application is already event sourced, but does not scale according to new requirements.

We want to migrate the data by migrating the events and replaying them on the persistent actors. I have read this post, and it looks like the last option is pretty good.

Do any of you guys have ideas on how to keep the existing timestamps of the events, so it looks like it was always running on Akka Persistence. I would really like a solution that is agnostic of the actual storage backend.

Thanks,
Christian

Hi Christian,

Akka Persistence has pluggable storage backend (called journal and snapshot store plugins). We typically recommend the Cassandra or JDBC plugins, but there are other implementations.

First you would have to transfer your old data (events) to the journal format and database. Some kind of migration job. Maybe persistent actors developed just for the migration, reading the old events and storing the new?

If you are starting now I would recommend the new APIs in Akka Typed: https://doc.akka.io/docs/akka/current/typed/persistence.html