Questions on the serialized event column definition for MySQL #792
Unanswered
martinbeentjes
asked this question in
Q&A
Replies: 1 comment
-
There's no particular reason, except that pretty simple events usually fit into 4k columns. We do not expect folks to use the provided setup scripts for anything but local development. Schemas for other databases such as Postgres even use other column types ( |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am investigating how we can implement Spring Modulith Events in our codebase as an improvement over several database queue tables we use. I see that
spring-modulith-events-jdbc
is able to a create theEVENT_PUBLICATION
table with the following definition:A question arises on the length of the
SERIALIZED_EVENT
column. Why is the choice made for a specific length of 4000 characters here?I can imagine that the average event being passed through is something like:
The event is serialized as JSON using Jackson. If I would start extending the event, and put data into it that I can use later, I do see the chance of it getting larger than 4000 characters. I don't expect to run into issues with this soon, but you never know.
So, why is the default when I use JDBC as my persistence for the events set to 4000?
Beta Was this translation helpful? Give feedback.
All reactions