@Embeddable public class DeadLetterEventEntry extends Object
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
.Modifier | Constructor and Description |
---|---|
protected |
DeadLetterEventEntry() |
|
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 new
DeadLetterEventEntry using the provided parameters. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getAggregateIdentifier()
Returns the original
DomainEventMessage.getAggregateIdentifier() , if it was a
DomainEventMessage . |
String |
getEventIdentifier()
Returns the original
EventMessage.getIdentifier() . |
String |
getMessageType()
Returns the message type, which is defined by the
DeadLetterJpaConverter that mapped this entry. |
SimpleSerializedObject<byte[]> |
getMetaData()
Returns the original metadata as a
SimpleSerializedObject . |
SimpleSerializedObject<byte[]> |
getPayload()
Returns the original payload as a
SimpleSerializedObject . |
Long |
getSequenceNumber()
Returns the original
DomainEventMessage.getSequenceNumber() , if it was a DomainEventMessage . |
String |
getTimeStamp()
Returns the original
EventMessage.getTimestamp() . |
SimpleSerializedObject<byte[]> |
getTrackingToken()
Returns the original
TrackedEventMessage.trackingToken() as a
SerializedObject , if the original message was a
TrackedEventMessage . |
String |
getType()
Returns the original
DomainEventMessage.getType() , if it was a DomainEventMessage . |
int |
hashCode() |
String |
toString() |
protected 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)
DeadLetterEventEntry
using the provided parameters. Parameters can be null if it's not
relevant for the messageType
. For example, a DomainEventMessage
contains an
aggregateType
, aggregateIdentifier
and sequenceNumber
, but a
GenericEventMessage
does not.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.public String getMessageType()
DeadLetterJpaConverter
that mapped this entry. Used
for later matching whether a converter can convert it back to an
EventMessage
.public String getEventIdentifier()
EventMessage.getIdentifier()
.public String getTimeStamp()
EventMessage.getTimestamp()
.public SimpleSerializedObject<byte[]> getPayload()
SimpleSerializedObject
.public SimpleSerializedObject<byte[]> getMetaData()
SimpleSerializedObject
.public String getType()
DomainEventMessage.getType()
, if it was a DomainEventMessage
.public String getAggregateIdentifier()
DomainEventMessage.getAggregateIdentifier()
, if it was a
DomainEventMessage
.public Long getSequenceNumber()
DomainEventMessage.getSequenceNumber()
, if it was a DomainEventMessage
.public SimpleSerializedObject<byte[]> getTrackingToken()
TrackedEventMessage.trackingToken()
as a
SerializedObject
, if the original message was a
TrackedEventMessage
.Copyright © 2010–2023. All rights reserved.