Class DeadLetterEventEntry
java.lang.Object
org.axonframework.eventhandling.deadletter.jpa.DeadLetterEventEntry
Represents an
EventMessage when stored into the database. It contains all
properties known in the framework implementations. Based on which properties are present, the original message type
can be determined. For example, if an aggregate identifier is present, it was a DomainEventMessage.- Since:
- 4.6.0
- Author:
- Mitchell Herrijgers
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeadLetterEventEntry(String messageType, String messageIdentifier, String messageTimestamp, String payloadType, String payloadRevision, byte[] payload, byte[] metaData, String aggregateType, String aggregateIdentifier, Long sequenceNumber, String tokenType, byte[] token) Constructs a newDeadLetterEventEntryusing the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the originalDomainEventMessage.getAggregateIdentifier(), if it was aDomainEventMessage.Returns the originalEventMessage.getIdentifier().Returns the message type, which is defined by theDeadLetterJpaConverterthat mapped this entry.SimpleSerializedObject<byte[]> Returns the original metadata as aSimpleSerializedObject.SimpleSerializedObject<byte[]> Returns the original payload as aSimpleSerializedObject.Returns the originalDomainEventMessage.getSequenceNumber(), if it was aDomainEventMessage.Returns the originalEventMessage.getTimestamp().SimpleSerializedObject<byte[]> Returns the originalTrackedEventMessage.trackingToken()as aSerializedObject, if the original message was aTrackedEventMessage.getType()Returns the originalDomainEventMessage.getType(), if it was aDomainEventMessage.inthashCode()toString()
-
Constructor Details
-
DeadLetterEventEntry
protected DeadLetterEventEntry() -
DeadLetterEventEntry
public DeadLetterEventEntry(String messageType, String messageIdentifier, String messageTimestamp, String payloadType, String payloadRevision, byte[] payload, byte[] metaData, String aggregateType, String aggregateIdentifier, Long sequenceNumber, String tokenType, byte[] token) Constructs a newDeadLetterEventEntryusing the provided parameters. Parameters can be null if it's not relevant for themessageType. For example, aDomainEventMessagecontains anaggregateType,aggregateIdentifierandsequenceNumber, but aGenericEventMessagedoes not.- Parameters:
messageType- The message type (required).messageIdentifier- The identifier of the message (required).messageTimestamp- The timestamp of the message (required).payloadType- The payload's type of the message.payloadRevision- The payload's revision of the message.payload- The serialized payload of the message.metaData- The serialized metadata of the message.aggregateType- The aggregate type of the message.aggregateIdentifier- The aggregate identifier of the message.sequenceNumber- The aggregate sequence number of the message.tokenType- The type of tracking token the message.token- The serialized tracking token.
-
-
Method Details
-
getMessageType
Returns the message type, which is defined by theDeadLetterJpaConverterthat mapped this entry. Used for later matching whether a converter can convert it back to anEventMessage.- Returns:
- The message type.
-
getEventIdentifier
Returns the originalEventMessage.getIdentifier().- Returns:
- The event identifier.
-
getTimeStamp
Returns the originalEventMessage.getTimestamp().- Returns:
- The event timestamp.
-
getPayload
Returns the original payload as aSimpleSerializedObject.- Returns:
- The original payload.
-
getMetaData
Returns the original metadata as aSimpleSerializedObject.- Returns:
- The original metadata.
-
getType
Returns the originalDomainEventMessage.getType(), if it was aDomainEventMessage.- Returns:
- The original aggregate type.
-
getAggregateIdentifier
Returns the originalDomainEventMessage.getAggregateIdentifier(), if it was aDomainEventMessage.- Returns:
- The original aggregate identifier.
-
getSequenceNumber
Returns the originalDomainEventMessage.getSequenceNumber(), if it was aDomainEventMessage.- Returns:
- The original aggregate sequence number.
-
getTrackingToken
Returns the originalTrackedEventMessage.trackingToken()as aSerializedObject, if the original message was aTrackedEventMessage.- Returns:
- The original tracking token.
-
equals
-
hashCode
public int hashCode() -
toString
-