Table of Contents

Class IdempotentReceiver<TPayload, TResult>

Namespace
PatternKit.Messaging.Reliability
Assembly
PatternKit.Core.dll

Decorates a message handler with idempotency-key claim, completion, and duplicate handling.

public sealed class IdempotentReceiver<TPayload, TResult>

Type Parameters

TPayload

The message payload type.

TResult

The handler result type.

Inheritance
IdempotentReceiver<TPayload, TResult>
Inherited Members

Methods

Create(IIdempotencyStore, MessageHandler)

Creates an idempotent receiver builder.

public static IdempotentReceiver<TPayload, TResult>.Builder Create(IIdempotencyStore store, IdempotentReceiver<TPayload, TResult>.MessageHandler handler)

Parameters

store IIdempotencyStore
handler IdempotentReceiver<TPayload, TResult>.MessageHandler

Returns

IdempotentReceiver<TPayload, TResult>.Builder

HandleAsync(Message<TPayload>, MessageContext?, CancellationToken)

Handles a message through the idempotent receiver.

public ValueTask<IdempotentReceiverResult<TResult>> HandleAsync(Message<TPayload> message, MessageContext? context = null, CancellationToken cancellationToken = default)

Parameters

message Message<TPayload>
context MessageContext
cancellationToken CancellationToken

Returns

ValueTask<IdempotentReceiverResult<TResult>>