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

MDCUnitOfWork behaviour incorrect with nested routes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.8.0
    • 2.8.1, 2.9.0
    • camel-core
    • None
    • Patch Available

    Description

      MDCUnitOfWork.clear() removes any content set by MDCUnitOfWork from MDC.
      If there are two separate exchange running at the same time in the same thread, as happens when a ProduceTemplate is used from Java, this is incorrect because the MDC of the parent is cleared after the child completes.
      Conceptually the MDC should be a stack, but MDC only accepts strings so the simplest thing to do is for MDCUnitOfWork to replace the previous values in clear().

      Attachments

        1. Camel-MDC.patch
          5 kB
          Yaytay

        Activity

          People

            davsclaus Claus Ibsen
            yaytay Yaytay
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: