Message Discard Notification

A client application receiving messages through non-durable consumers that use Direct Transport can test whether the event broker has discarded any non‑persistent messages previous to the current received message.

To test a non-persistent message sent using Direct Transport for its discard indication status, call message.getBooleanProperty(SupportedProperty.SOLACE_JMS_PROP_MSG_DISCARD_INDICATION). If the call returns true, the event broker has discarded one or more messages prior to the current message; if the call returns false, no messages prior to the current message were lost.

When a client application detects a message discard has occurred, it should handle this event appropriately. For example, it can follow its regular Session re‑initialization procedure.

:  Message discards can occur if an event broker’s egress per-client priority queues fill up with received messages. When this occurs, the oldest messages on the queues can be discarded to allow new incoming messages to be enqueued. Egress per-client priority queues could fill up in a situation where “slow subscribers” are not consuming messages quickly enough. For more information on egress per-client priority queues and how to configure them, refer to Message Delivery Resources.