Interface EventStore

All Superinterfaces:
DescribableComponent, EventBus, EventSink, StreamableEventSource, SubscribableEventSource, TrackingTokenSource
All Known Implementing Classes:
InterceptingEventStore, RecordingEventStore, StorageEngineBackedEventStore

public interface EventStore extends StreamableEventSource, EventBus, DescribableComponent
Infrastructure component providing the means to start an EventStoreTransaction to append events and event source models from the underlying storage solution.

As an extension of the EventBus, this EventStore serves as both the event storage mechanism and the event distribution mechanism. This dual role allows the EventStore to persist events durably while simultaneously distributing them to subscribed event handlers, eliminating the need for a separate EventBus component in event sourcing scenarios. Through the SubscribableEventSource capability inherited from EventBus, components can subscribe to receive events as they are stored. The exact timing of when events are published to subscribers is implementation-dependent and may occur within the same transaction if the ProcessingContext is shared between the storage and distribution operations.

As an implementation of the EventSink, this EventStore will initiate a transaction(ProcessingContext) when EventSink.publish(ProcessingContext, List) is triggered to append events. When a null ProcessingContext is given on EventSink.publish(ProcessingContext, List), the implementation should decide to construct a context itself or fail outright.

As an implementation of the StreamableEventSource, this EventStore will allow for StreamableEventSource.open(org.axonframework.messaging.eventstreaming.StreamingCondition, org.axonframework.messaging.core.unitofwork.ProcessingContext) a stream of events and use it as a source for StreamingEventProcessor.

Since:
0.1.0
Author:
Allard Buijze, Rene de Waele, Steven van Beelen