2

Is there a way to know how many times a specific message has been redelivered?

There's the method getCMSRedelivered() of the class cms::Message, that works alright but returns a boolean. There's also the method getRedeliveryCounter() of the class activemq::core::commands::Message, but that's an inner class I'd rather not access directly.

Thanks.

Ofer B
  • 117
  • 1
  • 12

1 Answers1

6

It's retrievable through the reserved vendor property in your Message:

getIntProperty("JMSXDeliveryCount");

or:

getLongProperty("JMSXDeliveryCount");
Tim Bish
  • 17,475
  • 4
  • 32
  • 42