Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-19371

RedeliveryErrorHandler's suppressed exceptions cause memory leak and logging issue

    XMLWordPrintableJSON

Details

    • Unknown

    Description

      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.

      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

      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.

      Attachments

        1. suppressed.log
          80 kB
          Bence

        Activity

          People

            davsclaus Claus Ibsen
            Meszaros Bence
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: