Class EventStoreSubscriptions
- Namespace
- Cratis.Chronicle.EventStoreSubscriptions
- Assembly
- Cratis.Chronicle.dll
Represents an implementation of IEventStoreSubscriptions.
public class EventStoreSubscriptions : IEventStoreSubscriptions
- Inheritance
-
EventStoreSubscriptions
- Implements
- Inherited Members
Constructors
EventStoreSubscriptions(IEventTypes, IEventStore, ILogger<EventStoreSubscriptions>)
Represents an implementation of IEventStoreSubscriptions.
public EventStoreSubscriptions(IEventTypes eventTypes, IEventStore eventStore, ILogger<EventStoreSubscriptions> logger)
Parameters
eventTypesIEventTypesThe IEventTypes.
eventStoreIEventStoreThe IEventStore.
loggerILogger<EventStoreSubscriptions>The ILogger.
Methods
Subscribe(EventStoreSubscriptionId, string, Action<IEventStoreSubscriptionBuilder>?)
Subscribe to events from a source event store's outbox.
public Task Subscribe(EventStoreSubscriptionId subscriptionId, string sourceEventStore, Action<IEventStoreSubscriptionBuilder>? configure = null)
Parameters
subscriptionIdEventStoreSubscriptionIdThe unique identifier for this subscription.
sourceEventStorestringThe name of the source event store to subscribe to.
configureAction<IEventStoreSubscriptionBuilder>Optional callback to configure the subscription (e.g. filter event types).
Returns
- Task
Awaitable task.
Unsubscribe(EventStoreSubscriptionId)
Remove a subscription by its identifier.
public Task Unsubscribe(EventStoreSubscriptionId subscriptionId)
Parameters
subscriptionIdEventStoreSubscriptionIdThe EventStoreSubscriptionId to remove.
Returns
- Task
Awaitable task.