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

DefaultUnitOfWork's headers for the original message are the same object as the in message headers

    XMLWordPrintableJSON

Details

    • Novice

    Description

      For jms messages, the useOriginalMessage does not work when headers are changed during the route because the DefaultUnitOfWork's headers are the same object as the in message's headers.

      In DefaultUnitOfWork, this.originalInMessage.setHeaders(exchange.getIn().getHeaders()); should be changed to create a copy of the headers instead of directly assigning.

      Maybe changed to this.originalInMessage.setHeaders((Map<String,Object>) new CaseInsensitiveMap(exchange.getIn().getHeaders()));

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              uvapalmer Joshua Palmer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: