Вопрос

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.

Это было полезно?

Решение

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

getIntProperty("JMSXDeliveryCount");

or:

getLongProperty("JMSXDeliveryCount");
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top