Axon requires the payload type to be able to deserialize the events payload from storage.
As the payload resembles an actual class, the fully qualified class name is needed.
However, there are option to use some form of aliasing, so that you could store shorter payload types than the fully qualified class name.
For that, you need to customize the Serializer you’re using.
If you’re using the XStreamSerializer, you can leverage the
addAlias(String, Class) function to add the aliases you want for your messages.
If you’re using the JacksonSerializer (typically suggested to be used for events), you’ll have to extend from the original serializer and override the
resolveClassName(SerializedType) to have more control over how your class names are stored in the payload type field.
I hope this gives you the necessary background Fredrik!