Method OnMessageDropped
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.
void OnMessageDropped<T>(NatsSubBase natsSub, int pending, NatsMsg<T> msg)
Parameters
natsSub
NatsSubBaseThe NatsSubBase representing the subscription.
pending
intThe 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.