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

Wrong handling of useMessageIDAsCorrelationID

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.2.0
    • camel-jms
    • None
    • Patch Available

    Description

      Camel jms seems to contain two bugs in correlation id handling.

      The first shows when you have a sender that has UseMessageIDAsCorrelationID="false" and a server that has UseMessageIDAsCorrelationID="true". If you send a message with correlationId="a" then the response message will contain correlationId="<request message id>". Even if this could be a valid behaviour as you wanted UseMessageIDAsCorrelationID="true" I donĀ“t think it makes sense as the sender will not be able to correlate the message. So for this case I propose to only set the correlation id to the request message id on the server if the correlation id of the request was not set.

      The second bug seems to hide the first bug. Perhaps someone found a quick (and wrong way to make the tests work). It shows when you set UseMessageIDAsCorrelationID="true" on both client and server. If you send a message with correlation id = "a" the client sends it out with this correlation id. The server then sets the correlation id to the request message id (first bug). Then on the client the reply is received. After that the correlation id is set back to "a" on the client. So the tests think all is well. This part of the code should be removed.

      I have marked both problems in the code with FIXME markers in my patch. I can also provide a patch with the solution but first I wanted to only show the problem and provide a failing test.

      Hope my explanations were not to confused

      Attachments

        1. camel-jms-correlation.patch
          6 kB
          Christian Schneider
        2. camel-jms-2010-01-08.patch
          13 kB
          Christian Schneider

        Activity

          People

            davsclaus Claus Ibsen
            cschneider Christian Schneider
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: