Lagom Events Replay

Hi All, I am working on Lagom project with scala. Earlier I was using Cassandra to store all events but now I want to change it to MySQL as my data is very less so using cassandra is not a good option. Can anybody tell me how we can migrate Cassandra events to MySQL events?

1 Like

Hi!
Do you want to migrate data from Cassandra to MySQL?
Or only change driver of persistence?

I want events data to me migrated from Cassandra to Mysql.

I think this would be quite difficult to achieve within a single service (at least without dealing with lagom data internals), as I don’t think you can mix jdbc & cassandra write-sides in the same service

But you can achieve this by replicating your service with a different name and then, in your original service, you can implement a custom ReadSide that would send the corresponding command for each received event to the new service.
That is not very robust but for a one-time migration, that sounds acceptable to me. I used that approach with success to migrate my data to some newly designed service.

I guess another approach would to copy the data from cassandra to mysql without using Lagom but that looks quite difficult.