7 Replies Latest reply on Feb 25, 2008 8:57 AM by Daniel Bevenius

    JMSMessage vs ESBMessage and different IDs

    Haagen Hasle Novice

      I'm looking at the code (in CP1), and wondering about the different IDs that you're using. It seems that DefaultJMSPropertiesSetter is used to transfer IDs from an ESBMessage to a JMSMessage. And DefaultESBPropertiesSetter goes the other way around.

      Now, in DefaultESBProperties.setPropertiesFromJMSMessage(...), there are methods for setting the messageID and the correlationID of the ESBMessage. In setMessageID, the messageID is taken from JMSMessage.getJMSMessageID(). In setCorrelationID, the relatesTo is taken from JMSMessage.getJMSCorrelationID().

      In DefaultJMSPropertiesSetter, the method setJMSMessageID actually sets the JMSCorrelationID, not the JMSMessageID as I would have expected. (It takes the value from the ESB.getHeader().getCall().getMessageID() as expected.)

      Is this really the way it's supposed to be? If it is, can someone explain to me how this works?

      I suspect that this causes my messages to change ID during the processing, and I don't really like that. I set the ID to be something like "#message1", "#message2" etc, but they end up looking like "JBM-12339"..

      Regards, Haagen