Delivery Count for Shared Durables
When a persistence server delivers a message from a shared durable to a subscriber, it includes a delivery count, indicating the number of times the persistence server has already delivered the message to other subscribers. It is good practice for message callbacks in application programs to check this value as evidence for messages that cause unexpected behavior.
Greater than Zero
If the delivery count is greater than zero, you can infer that one or more subscribing application processes received the message, but did not finish processing the message.
A higher delivery count correlates with higher probability that the message itself causes unexpected behavior in applications that attempt to process it. A message callback could shunt the message away from normal processing and output a log.
Administrators can set a parameter of shared durables to limit the maximum delivery attempts. Nonetheless, robust subscribing applications test the delivery count to defend against problematic messages.
Zero
If the delivery count is zero, you can infer that the application is the first to receive the message from the persistence server.