Method NextAsync
NextAsync<T>(INatsDeserialize<T>?, NatsJSNextOpts?, CancellationToken)
Get the next message from the stream in order.
public ValueTask<NatsJSMsg<T>?> NextAsync<T>(INatsDeserialize<T>? serializer = null, NatsJSNextOpts? opts = null, CancellationToken cancellationToken = default)
Parameters
serializer
INatsDeserialize<T>Serializer to use for the message type.
opts
NatsJSNextOptsNext options.
cancellationToken
CancellationTokenA CancellationToken used to cancel the underlying fetch operation.
Returns
Type Parameters
T
Serialized message data type.