Class EventStoreEventPublisher<TAuthenticationToken>
A IEventPublisher<TAuthenticationToken> that uses Greg Young's Event Store.
Inheritance
Inherited Members
Namespace: Cqrs.EventStore.Bus
Assembly: Cqrs.EventStore.dll
Syntax
public class EventStoreEventPublisher<TAuthenticationToken> : IEventPublisher<TAuthenticationToken>
Type Parameters
Name | Description |
---|---|
TAuthenticationToken | The System.Type of the authentication token. |
Constructors
EventStoreEventPublisher(IEventStoreConnectionHelper, IStoreLastEventProcessed)
Instantiates a new instance of EventStoreEventPublisher<TAuthenticationToken>
Declaration
public EventStoreEventPublisher(IEventStoreConnectionHelper eventStoreConnectionHelper, IStoreLastEventProcessed lastEventProcessedStore)
Parameters
Type | Name | Description |
---|---|---|
IEventStoreConnectionHelper | eventStoreConnectionHelper | The EventStore.ClientAPI.IEventStoreConnection used to read and write streams in the Greg Young Event Store. |
IStoreLastEventProcessed | lastEventProcessedStore | The store that hold stream position information. |
Properties
EventStoreConnection
The EventStore.ClientAPI.IEventStoreConnection used to read and write streams in the Greg Young Event Store.
Declaration
protected IEventStoreConnection EventStoreConnection { get; }
Property Value
Type | Description |
---|---|
EventStore.ClientAPI.IEventStoreConnection |
LastEventProcessedStore
The store that hold stream position information.
Declaration
protected IStoreLastEventProcessed LastEventProcessedStore { get; }
Property Value
Type | Description |
---|---|
IStoreLastEventProcessed |
Routes
The actions to execute per System.Type
Declaration
protected Dictionary<Type, List<Action<IMessage>>> Routes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.Type, System.Collections.Generic.List<System.Action<IMessage>>> |
Methods
InitialiseCatchUpSubscription()
Reads the position the store was last within the stream and subscribes requesting all events prior to that position aren't replayed.
Declaration
protected void InitialiseCatchUpSubscription()
Publish<TEvent>(TEvent)
Publishes the provided event
on the event bus.
Declaration
public void Publish<TEvent>(TEvent event)where TEvent : IEvent<TAuthenticationToken>
Parameters
Type | Name | Description |
---|---|---|
TEvent | event |
Type Parameters
Name | Description |
---|---|
TEvent |
Implements
Publish<TEvent>(IEnumerable<TEvent>)
Publishes the provided events
on the event bus.
Declaration
public void Publish<TEvent>(IEnumerable<TEvent> events)where TEvent : IEvent<TAuthenticationToken>
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TEvent> | events |
Type Parameters
Name | Description |
---|---|
TEvent |