-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serialize event in separate column #91
Comments
Thanks for pointing this out! Indeed having the meta data available directly on the DB level might make life easier. |
The suggested solution assumes that we will keep each meta data in a separate column. This is probably the most generic solution, easy to implement on various different RDBMSes, although in terms of further migrations (if further version of Akka-persistence introduces additional meta information, we will have to add yet another column) we decided to leverage another PostgreSQL feature here - support for JSONB column type. I'm going to add only one additional column which will contains all the metadata and (thanks to the built-in DB functions) still will be accessible at the DB level. |
I think you serialize the full PersistentRepr?
I would highly recommend to serialize the event payload in a separate column and the other meta data from PersistentRepr in separate columns. That gives better ways to inspect the user data since it's not wrapped.
This is a flaw in akka-persistence-jdbc that we intend to change, see akka/akka-persistence-jdbc#318
The text was updated successfully, but these errors were encountered: