Interface StreamableEventSource
- All Superinterfaces:
TrackingTokenSource
- All Known Subinterfaces:
EventStore
- All Known Implementing Classes:
InterceptingEventStore,RecordingEventStore,StorageEngineBackedEventStore
Interface towards a streamable event source.
Provides functionality to open an
event stream.
- Since:
- 3.0
- Author:
- Allard Buijze, Rene de Waele, Steven van Beelen
-
Method Summary
Methods inherited from interface org.axonframework.messaging.eventstreaming.TrackingTokenSource
firstToken, latestToken, tokenAt
-
Method Details
-
open
MessageStream<EventMessage> open(@Nonnull StreamingCondition condition, @Nullable ProcessingContext context) Open anevent streamcontaining alleventsmatching the givencondition.To retrieve the
positionof the returned events, theTrackingToken.fromContext(Context)operation should be used by providing the entireMessageStream.Entrywrapping the returned events.Note that the returned stream is infinite, so beware of applying terminal operations to the returned stream.
When all events are of interest during streaming, then use
EventCriteria.havingAnyTag()as the condition criteria.- Parameters:
condition- TheStreamingConditiondefining thestarting positionof the stream andevent criteriato filter the stream with.context- The currentProcessingContext, if any.- Returns:
- An
event streammatching the givencondition.
-