Package org.axonframework.eventhandling
Interface TrackedEventMessage<T>
- Type Parameters:
T- The type of payload contained in this Message
- All Superinterfaces:
EventMessage<T>,Message<T>,Serializable
- All Known Implementing Classes:
GenericTrackedDomainEventMessage,GenericTrackedEventMessage
Represents an
EventMessage containing a TrackingToken. The tracking token can be used be event processors to keep track of which events it has processed.- Author:
- Rene de Waele
-
Method Summary
Modifier and TypeMethodDescriptionReturns theTrackingTokenof the event message.withTrackingToken(TrackingToken trackingToken) Creates a copy of this message with the giventrackingTokento replace the one in this message.Methods inherited from interface org.axonframework.eventhandling.EventMessage
andMetaData, getIdentifier, getTimestamp, withMetaDataMethods inherited from interface org.axonframework.messaging.Message
getMetaData, getPayload, getPayloadType, serializeMetaData, serializePayload
-
Method Details
-
trackingToken
TrackingToken trackingToken()Returns theTrackingTokenof the event message.- Returns:
- the tracking token of the event
-
withTrackingToken
Creates a copy of this message with the giventrackingTokento replace the one in this message.This method is useful in case streams are modified (combined, split), and the tokens of the combined stream are different than the originating stream.
- Parameters:
trackingToken- The tracking token to replace- Returns:
- a new instance of a message with a different tracking token
-