JMS throwExceptionForRetry does not increment JMSXDeliveryCount

I have a service, invoked by a JMS trigger, that calls throwExceptionForRetry. On each retry attempt, the JMSXDeliveryCount remains at 1 – it is not incremented for each attempt.

  • Is there a way to get JMSXDeliveryCount to increment on retries?
  • Is there another way for a service to determine how many times an incoming JMS message has been attempted?

Hi Michael,

Looks like IS is reprocessing the message locally so message redelivery count doesn’t really change.
Message delivery count is increased when JMS provider is forced to resend the message.
I am not IS expert, but you could try something along following lines:

  • set trigger to client acknowledge mode to ensure message is removed from provider only when processing is successful.
  • during processing call throwException or something equivalent. That will cause processing to fail and message should get re delivered with expected values.