CancellationSharer

CancellationSharer

Coordinates multiple publish attempts (attempt 0 = original, 1..N = hedged) for a single batch of messages.

Constructor

new CancellationSharer()

Members

isDone

Returns true if this batch has already completed (succeeded, failed, or cancelled).

successfulAttempt

Returns the attempt number that succeeded, or undefined if none has succeeded.

Methods

addAttempt()

Registers an in-flight publish attempt with this coordinator.

cancel()

Cancels all running attempts and marks the coordinator as done.