Is there a way to set the maximum number of message redeliveries in ActiveMQ when using the Apache.NMS libraries?

StackOverflow https://stackoverflow.com/questions/3998797

  •  10-10-2019
  •  | 
  •  

Question

I'm using Apache.NMS 1.4. I need to be able to programmatically set the maximum number of times a message can be delivered before being placed in the DLQ (Dead Letter Queue). Is there a way to do it?

Was it helpful?

Solution

add this to your connection string nms.RedeliveryPolicy.MaximumRedeliveries=5

Example: tcp://localhost:61616?nms.RedeliveryPolicy.MaximumRedeliveries=5

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top