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

Possible memoryleak when convertBodyTo is used in a dynamicRouter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.13.2
    • 2.13.4, 2.14.1, 2.15.0
    • camel-core
    • None
    • Unknown

    Description

      We have implemented a while loop using a dynamicRouter.
      The dynamicRouter looks like this:
      <dynamicRouter>
      <header>someheadername</header>
      </dynamicRouter>
      where someheadername refers to another route using direct:routename

      The route that handles direct:routename looks like this:
      <bean ref="someref"/>
      <convertBodyTo type="java.lang.String"/>

      The someref-bean just puts some data in the body and header and would also be responsible to set the value of someheadername=null to exit the dynamicRouter.
      During execution of these routes we see that heapusage increases until OOM if the dynamicRouter does not exit before OOM. The number of instances of DefaultMessage also keeps increasing.

      If we remove the <convertBodyTo> from the route we do not get OOM and the number of instances of DefaultMessage is stable and low.
      The same also happens if we replace <convertBodyTo> with a <transform>.

      Attachments

        1. SomeProcessor.java
          1.0 kB
          Bjørn Hilstad
        2. applicationContext.xml
          1 kB
          Bjørn Hilstad

        Activity

          People

            davsclaus Claus Ibsen
            bjorn.hilstad Bjørn Hilstad
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: