Table of Contents

Property ThrowOnListCancellation

Namespace
NATS.Client.JetStream
Assembly
NATS.Client.JetStream.dll

ThrowOnListCancellation

When true, cancelling a paginated list enumeration (streams, consumers, and their names) throws OperationCanceledException instead of ending the enumeration silently.

public bool ThrowOnListCancellation { get; init; }

Property Value

bool

Remarks

Defaults to false for backwards compatibility, which ends the enumeration without throwing. Setting this to true matches the conventional IAsyncEnumerable<T> cancellation contract and lets callers distinguish a complete list from one truncated by cancellation.