shared serialization configuration

Consider I have some spring boot applications connected to my axon-server cluster.

I suppose these applications should agree on a common serialization format, so they can share messages.

From what I see, the axon server itself is not configured to use a certain data format, so it’s up to each of my apps to configure the same format.

First question: Is my assumption true?
Second question: what is a good practice to achieve this? I would ignore the axon-starter and set up a custom starter based on axon-autoconfiguration that holds all the shared configuration in my context. Are there any examples for this? It must be a quite common requirement.


Hi Jan,

In Axon applications/services, the contract (API) is represented as a set of messages (commands, events and queries) which the application publishes and consumes. We create runnable applications/services with contracts (API) published as schema. This generally means that if the events/commands/queries are published as JSON, or perhaps a more economical object format (Protobuf), the consumer should consume the messages by parsing them to obtain their data attributes.

Your assumption is true !

I do not see any problem with sharing your Serializer configuration between applications in any way.

Once you publish your API as schema, it is important to define automated acceptance tests, for example (Consumer Driven Contracts) which validate the API the upstream application/service provide. You should also choose schema format to serialize your messages which is backward and forward compatibility friendly, so you can evolve and deploy your services/applications independently.