Table of Contents

Method ReceiveAsync

Namespace
NATS.Client.Core
Assembly
NATS.Client.Core.dll

ReceiveAsync(string, string?, ReadOnlySequence<byte>?, ReadOnlySequence<byte>)

Called when a message is received for the subscription. Calls ReceiveInternalAsync(string, string?, ReadOnlySequence<byte>?, ReadOnlySequence<byte>) to process the message handling any exceptions.

public virtual ValueTask ReceiveAsync(string subject, string? replyTo, ReadOnlySequence<byte>? headersBuffer, ReadOnlySequence<byte> payloadBuffer)

Parameters

subject string

Subject received for this subscription.

replyTo string

Reply subject received for this subscription.

headersBuffer ReadOnlySequence<byte>?

Headers buffer received for this subscription.

payloadBuffer ReadOnlySequence<byte>

Payload buffer received for this subscription.

Returns

ValueTask