Method ReplyAsync
ReplyAsync(NatsHeaders?, string?, NatsPubOpts?, CancellationToken)
Send a reply with an empty message body.
public ValueTask ReplyAsync(NatsHeaders? headers = null, string? replyTo = null, NatsPubOpts? opts = null, CancellationToken cancellationToken = default)
Parameters
headers
NatsHeadersOptional message headers.
replyTo
stringOptional reply-to subject.
opts
NatsPubOptsOptional publishing options.
cancellationToken
CancellationTokenA CancellationToken used to cancel the API call.
Returns
ReplyAsync<TReply>(TReply, NatsHeaders?, string?, INatsSerialize<TReply>?, NatsPubOpts?, CancellationToken)
Send a reply with a message body.
public ValueTask ReplyAsync<TReply>(TReply data, NatsHeaders? headers = null, string? replyTo = null, INatsSerialize<TReply>? serializer = null, NatsPubOpts? opts = null, CancellationToken cancellationToken = default)
Parameters
data
TReplyData to be sent.
headers
NatsHeadersOptional message headers.
replyTo
stringOptional reply-to subject.
serializer
INatsSerialize<TReply>Serializer to use for the message type.
opts
NatsPubOptsOptional publishing options.
cancellationToken
CancellationTokenA CancellationToken used to cancel the API call.
Returns
Type Parameters
TReply
A serializable type as data.