KubeMQ
Client SDKsC#Reference

Events Store

Durable events with replay — KubeMQ C# SDK reference.

Persist events with SendEventStoreAsync and replay them with SubscribeToEventsStoreAsync, configuring StartPosition and start value fields on the subscription object.

SendEventStoreAsync

Task<EventStoreResult> SendEventStoreAsync(EventStoreMessage message, CancellationToken ct = default);

SubscribeToEventsStoreAsync

IAsyncEnumerable<EventStoreReceived> SubscribeToEventsStoreAsync(
    EventStoreSubscription subscription, CancellationToken ct = default);

EventStoreSubscription adds:

PropertyTypeDescription
StartPositionEventStoreStartPositionReplay start enum
StartSequencelong?Sequence number; required when StartPosition is StartAtSequence
StartTimeDateTimeOffset?Point in time; required when StartPosition is StartAtTime
StartTimeDeltaSecondsint?Seconds before now; required when StartPosition is StartAtTimeDelta

Quick Usage

EventsStore.cs
await client.SendEventStoreAsync(new EventStoreMessage
{
    Channel = "audit",
    Body = payload,
});

See Also

Was this page helpful?

On this page