An active subscription that yields NatsMessages as they arrive.
Iterate it with for await; the loop ends when unsubscribe is called or the connection closes. It is an AsyncDisposable, so await using unsubscribes automatically.
for await
AsyncDisposable
await using
1.0.0
Readonly
The subject this subscription matches.
Stops the subscription (UNSUB) and ends the iterator.
UNSUB
Resolves once the UNSUB is written.
An active subscription that yields NatsMessages as they arrive.
Iterate it with
for await; the loop ends when unsubscribe is called or the connection closes. It is anAsyncDisposable, soawait usingunsubscribes automatically.Since
1.0.0