how to migrate mysql to eventstore(mongo)?
originally, data was stored in mysql (not cqrs, es).
for cqrs/es, i’m gonna use axon.(with mongodb, kafka)
I only know that timestamp is set when stored in the eventstore.
there is a migration problem, I want to process mysql data and manually put timestamp when producer issues event.
Is it possible?
if there is any other good way, please recommend it
when emitting events (during data conversion from mysql to event store) you can use custom
metadata of an event to set your timestamp, I am not sure if there is a possiblility to change the
timestamp given by framework when putting new events to event store.
I wonder if there a better solution.
The question to you, why do you want to use mongo as event store instead of using axon event store that is designed specific for this?
@rsobies thank you to reply!!
you mean using metadata, i can insert my timestamp?
it’s for my study about mongo, kafka, cqrs pattern so i don’t use axon event store.
you can read about meta data here Anatomy of a Message - Axon Reference Guide
using @MetaDataValue in event handler, the framework will inject requested value, Supported Parameters for Annotated Handlers - Axon Reference Guide
i use separate app like query app and command app.
command app has command handler and store event to event store(database 1).
query app has event handler and store event state to database 2.
i want to insert my own timestamp in command app(event store-domainevents).
i thought metadata is applied only for eventhandler.
im gonna search metadata in command handler.
thank you to recommand these references!