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
natsSubNatsSubBaseThe NatsSubBase representing the subscription.
pendingintThe number of pending messages at the time the drop occurred.
msgNatsMsg<T>The dropped message represented by NatsMsg<T>.
Type Parameters
TSpecifies 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.