Snake-case and camel-case serialization in our event store. What could be the cause?

Hi,

I am working in the same team as Jaco. We ended up looking into Axon Framework source code while investigating this problem. From it we concluded that there is some non-deterministic behavior going on when Axon Framework decides which Jackson ObjectMapper to use, and there are multiple ObjectMappers in the Spring context. In our case that meant that sometimes Axon-using microservice X got an ObjectMapper with snake case property naming, and Axon-using microservice Y got one with camel case property naming. Which meant they did not understand each others’ messages.

In an attempt to make the code in AxonAutoConfiguration.buildSerializer have a stable outcome for us, we adjusted our microservices’ Spring configurations to have yet another ObjectMapper bean, with name “defaultAxonObjectMapper”.

It does feel like a bit of a hack and a dependency on Axon Framework internal implementation details, but seems to have worked for now.