spring-projects / spring-framework

Spring Framework
https://spring.io/projects/spring-framework
Apache License 2.0
56.27k stars 37.99k forks source link

spring-jms DefaultMessageListenerContainer when using retries cause comes as null in Dead Letter Queue using ActiveMQ #22817

Closed lfernandez93 closed 11 months ago

lfernandez93 commented 5 years ago

Hi Spring community,

I'm implementing retries with a DLQ in spring, I'm using the DefaultMessageListenerContainer but not the SimpleMessageListenerContainer, when the retries exceed the message in the DLQ looks like the following:

java.lang.Throwable: Delivery[2] exceeds redelivery policy imit:RedeliveryPolicy {destination = queue://*, collisionAvoidanceFactor = 0.15, maximumRedeliveries = 1, maximumRedeliveryDelay = -1, initialRedeliveryDelay = 10000, useCollisionAvoidance = false, useExponentialBackOff = true, backOffMultiplier = 5.0, redeliveryDelay = 10000, preDispatchCheck = true}, cause:null

the cause:null should be coming back with the exception that happened in the consumer but it doesn't, apparently in spring we are swallowing the exception (in the DefaultMessageListenerContainer) and ActiveMQ cannot remember the cause as per: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-5-Not-able-to-get-the-DLQ-DELIVERY-FAILURE-CAUSE-PROPERTY-value-td3492931.html.

lfernandez93 commented 5 years ago

thoughts?

aktraore commented 5 years ago

We have observed the same behavior in our implementation of retries in spring. Any thoughts ?

erwannleroy commented 5 years ago

Hello, I'm facing the same problem, is the correction planed in a future release ?

Athou commented 3 years ago

I just encountered the same problem today, did anyone find a solution to this?

snicoll commented 1 year ago

Sorry this got overlooked. Can any of you share a small sample that reproduces the problem and that we can run ourselves? Without that, I am afraid we can't make much progress.

spring-projects-issues commented 11 months ago

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-projects-issues commented 11 months ago

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.