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
serializerINatsDeserialize<T>Serializer to use for the message type.
optsNatsJSNextOptsNext options.
cancellationTokenCancellationTokenA CancellationToken used to cancel the underlying fetch operation.
Returns
Type Parameters
TSerialized message data type.