Property DrainOnCancel
DrainOnCancel
When true, cancelling the token passed to ConsumeAsync drains the consumer gracefully (stop pulling, deliver buffered messages so handlers can ACK, then complete) and leaves the connection usable, instead of stopping immediately. (default: false)
public bool DrainOnCancel { get; init; }
Property Value
Remarks
Only the standard pull consumer's ConsumeAsync honors this. Ordered consumers (see NatsJSOrderedConsumer) do not ACK and always stop promptly on cancel, so the option has no effect there.