Claus Ibsen created CAMEL-27981:
-----------------------------------

             Summary: camel-core - aggregator recovery fails with a 
NullPointerException when maximumRedeliveries is set without deadLetterUri
                 Key: CAMEL-27981
                 URL: https://issues.apache.org/jira/browse/CAMEL-27981
             Project: Camel
          Issue Type: Bug
          Components: camel-core
            Reporter: Claus Ibsen
             Fix For: 4.25.0


h4. 1. AggregateProcessor.RecoverTask.run (camel-core-processor)

When a recoverable aggregation repository has maximumRedeliveries > 0 and no 
deadLetterUri, the exhausted branch calls deadLetterProducerTemplate.send(...), 
but that template is only created when deadLetterUri is set, so it is null. The 
NullPointerException is caught, and every recovery scan logs "Failed to move 
recovered Exchange to dead letter channel: null". The exchange is never sent 
again and never confirmed, so it stays in the repository for ever.

This is the default setup of the Caffeine, Ehcache, Hazelcast, Infinispan and 
Redis aggregation repositories, which default to maximumRedeliveries=3.

Proposed change: take the exhausted branch only when a deadLetterUri is 
configured (else keep redelivering, or log and confirm), or fail at start when 
maximumRedeliveries > 0 has no deadLetterUri.

Found while checking the option and console descriptions of CAMEL-27980.

----
_Filed by Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to