@ConfigurationProperties(value="axon.serializer") public class SerializerProperties extends Object
The Event serializer, if specified, is used to serialize the payload and meta-data of EventMessages as they are stored in the event store and published. If no Event Serializer is specified, it defaults to the Message Serializer.
The Message Serializer is used to serialize the payload and meta-data of all messages and, where relevant, their return values. Commands, Queries and Events, but also the Command Result and Query Responses are serialized using this serializer. If no Message Serializer is specified, it defaults to the General Serializer.
The General Serializer is used to serialize the rest of the objects, such as TrackingTokens, Saga state,
Snapshot Events and all other data that needs to be serialized, but is not expected to be shared with other systems.
If no General Serializer is specified, it defaults to an XStream based serializer (see
XStreamSerializer
).
Modifier and Type | Class and Description |
---|---|
static class |
SerializerProperties.SerializerType
Enumerates different possible standard serializers, available in Axon.
|
Constructor and Description |
---|
SerializerProperties() |
Modifier and Type | Method and Description |
---|---|
SerializerProperties.SerializerType |
getEvents()
The type of serializer to use to serialize the payload and meta data of Event Messages.
|
SerializerProperties.SerializerType |
getGeneral()
The type of serializer to use to serialize any type of object, for which no more specific serializer is
configured.
|
SerializerProperties.SerializerType |
getMessages()
The type of serializer to use to serialize the payload and meta data of Messages.
|
void |
setEvents(SerializerProperties.SerializerType serializerType)
The type of serializer to use to serialize the payload and meta data of Event Messages.
|
void |
setGeneral(SerializerProperties.SerializerType serializerType)
Sets the type of serializer to use to serialize any type of object, for which no more specific serializer is
configured.
|
void |
setMessages(SerializerProperties.SerializerType serializerType)
The type of serializer to use to serialize the payload and meta data of Messages.
|
public SerializerProperties.SerializerType getGeneral()
public void setGeneral(SerializerProperties.SerializerType serializerType)
serializerType
- The serializer to use for serialization of all kinds of objects.public SerializerProperties.SerializerType getEvents()
public void setEvents(SerializerProperties.SerializerType serializerType)
serializerType
- The type of serializer to use for Event Messages.public SerializerProperties.SerializerType getMessages()
public void setMessages(SerializerProperties.SerializerType serializerType)
serializerType
- The type of serializer to use for Messages.Copyright © 2010–2022. All rights reserved.