Interface IEventStoreSubscriptionBuilder

Namespace
Cratis.Chronicle.EventStoreSubscriptions
Assembly
Cratis.Chronicle.dll

Defines a builder for configuring an event store subscription.

public interface IEventStoreSubscriptionBuilder
Extension Methods

Methods

Build()

Build the subscription definition.

EventStoreSubscriptionDefinition Build()

Returns

EventStoreSubscriptionDefinition

The EventStoreSubscriptionDefinition.

WithEventType(EventTypeId)

Specify an event type by its identifier to subscribe to.

IEventStoreSubscriptionBuilder WithEventType(EventTypeId eventTypeId)

Parameters

eventTypeId EventTypeId

The EventTypeId of the event type to include.

Returns

IEventStoreSubscriptionBuilder

The builder for continuation.

WithEventType(EventTypeId, EventTypeGeneration)

Specifies an exact event generation by its identifier.

IEventStoreSubscriptionBuilder WithEventType(EventTypeId eventTypeId, EventTypeGeneration generation)

Parameters

eventTypeId EventTypeId

The event type identifier.

generation EventTypeGeneration

The declared event generation.

Returns

IEventStoreSubscriptionBuilder

The builder for continuation.

Exceptions

EventStoreSubscriptionGenerationDeliveryNotSupported

The builder does not support exact generation declarations.

WithEventType<TEvent>()

Specify the event types to subscribe to. If not specified, all events are subscribed.

IEventStoreSubscriptionBuilder WithEventType<TEvent>()

Returns

IEventStoreSubscriptionBuilder

The builder for continuation.

Type Parameters

TEvent

The event type to include.

WithGenerationDelivery(EventGenerationDelivery)

Sets the generation delivery policy. Compatibility is the default.

IEventStoreSubscriptionBuilder WithGenerationDelivery(EventGenerationDelivery generationDelivery)

Parameters

generationDelivery EventGenerationDelivery

The generation delivery policy.

Returns

IEventStoreSubscriptionBuilder

The builder for continuation.

Exceptions

EventStoreSubscriptionGenerationDeliveryNotSupported

The builder does not support pinned delivery.