You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Bence (Jira)" <ji...@apache.org> on 2023/05/18 13:25:00 UTC

[jira] [Created] (CAMEL-19371) RedeliveryErrorHandler's suppressed exceptions cause memory leak and logging issue

Bence created CAMEL-19371:
-----------------------------

             Summary: RedeliveryErrorHandler's suppressed exceptions cause memory leak and logging issue
                 Key: CAMEL-19371
                 URL: https://issues.apache.org/jira/browse/CAMEL-19371
             Project: Camel
          Issue Type: Bug
          Components: camel-core-processor
    Affects Versions: 3.14.1
            Reporter: Bence
         Attachments: suppressed.log

Hi There,


I am a bit dubious about the behavior of RedeliveryErrorHandler's handleException() method in camel-core-processor bundle.

Chaining all exceptions in suppressedExceptions of Throwable during the redelivery process may not be the original intention, at least the comment below is suggesting that the goal was something else here.
{quote}
if (previous != null && previous != e) {
// a 2nd exception was thrown while handling a previous exception
// so we need to add the previous as suppressed by the new exception
// see also FatalFallbackErrorHandler
{quote}

The consequence of adding the previous exception to the suppressedExceptions list of the current one is building up an infinite chain of objects, besides a single log entry can be huge after a couple of retry attempts, see attached log.
I think the best would be to turn this feature on/off by a configuration parameter.

Thank you.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)