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

public interface TrackedEventMessage<T> extends EventMessage<T>
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 Details

    • trackingToken

      TrackingToken trackingToken()
      Returns the TrackingToken of the event message.
      Returns:
      the tracking token of the event
    • withTrackingToken

      TrackedEventMessage<T> withTrackingToken(TrackingToken trackingToken)
      Creates a copy of this message with the given trackingToken to 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