Table of Contents

Method OnMessageDropped

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

OnMessageDropped<T>(NatsSubBase, int, NatsMsg<T>)

Called when a message is dropped for a subscription. Used to aid in custom message handling when a subscription's message channel is full.

public void OnMessageDropped<T>(NatsSubBase natsSub, int pending, NatsMsg<T> msg)

Parameters

natsSub NatsSubBase

The NatsSubBase representing the subscription.

pending int

The number of pending messages at the time the drop occurred.

msg NatsMsg<T>

The dropped message represented by NatsMsg<T>.

Type Parameters

T

Specifies the type of data in the dropped message.

Remarks

This method is expected to complete quickly to avoid further delays in processing; if complex work is required, it is recommended to offload to a channel or other out-of-band processor.