Table of Contents

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

eventTypes IEventTypes

The IEventTypes.

eventStore IEventStore

The IEventStore.

logger ILogger<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

subscriptionId EventStoreSubscriptionId

The unique identifier for this subscription.

sourceEventStore string

The name of the source event store to subscribe to.

configure Action<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

subscriptionId EventStoreSubscriptionId

The EventStoreSubscriptionId to remove.

Returns

Task

Awaitable task.