-
1. Re: JMSMessage vs ESBMessage and different IDs
beve Feb 25, 2008 6:52 AM (in response to haagenhasle)Hi Haagen,
DefaultJMSPropertiesSetter sets the JMSCorrelationID as there is no way to set the JMSMessageID for an outgoing JMS message.
The JMSMessageID is set by the JMS Provider.
Regards,
Daniel -
2. Re: JMSMessage vs ESBMessage and different IDs
haagenhasle Feb 25, 2008 7:17 AM (in response to haagenhasle)But the correlationId is set in both setJMSCorrelationID(..) and setJMSMessageID(..). Won't the last call cancel out/overwrite the first? (And always end up being equal to
fromESBMessage.getHeader().getCall().getRelatesTo().getFragment()?)
Regards, Haagen -
3. Re: JMSMessage vs ESBMessage and different IDs
haagenhasle Feb 25, 2008 7:21 AM (in response to haagenhasle)And why do you call
toESBMessage.getHeader().getCall().setMessageID( new URI( fromJMSMessage.getJMSMessageID() ));
in DefaultESBPropertiesSetter? Based on what you say, won't the ESBMessage always change messageID after being transfered on a JMS queue?
Regards, Haagen -
4. Re: JMSMessage vs ESBMessage and different IDs
beve Feb 25, 2008 7:25 AM (in response to haagenhasle)The idea here is that if a JMS client has set a custom correlation if it should pass through the system and be set as the outgoing JMS messages correlation id.
But if no correlation id was set by the caller the JMSMessageID will be used.
This is a quite common pattern, to correlate using message id's.
Regards,
Daniel -
5. Re: JMSMessage vs ESBMessage and different IDs
haagenhasle Feb 25, 2008 7:36 AM (in response to haagenhasle)But it does mean I can't rely on a message having the same ID all through the ESB? Or have I misunderstood?
Regards, Haagen -
6. Re: JMSMessage vs ESBMessage and different IDs
beve Feb 25, 2008 8:37 AM (in response to haagenhasle)But it does mean I can't rely on a message having the same ID all through the ESB? Or have I misunderstood?
It depends on the actions in the pipeline. An action could create a new ESB Message object and hence would get a new ESB Message ID.
The original requirement for the setting of JMS Header fields and properties was to have the JMSMessageID flow through the ESB and set on the outgoing JMS Message. This might not ,and will probably not, meet all users requirements, which is why these are only Default implemenations. Users should be able to override these defaults.
That said I think you are right and we should probably change the default impl to not set the ESB Message id and only rely on the correlation id. Would be less intrusive.
Regards,
Daniel -
7. Re: JMSMessage vs ESBMessage and different IDs
beve Feb 25, 2008 8:57 AM (in response to haagenhasle)I've created a JIRA for this http://jira.jboss.com/jira/browse/JBESB-1559,
so we can track this issue.
Regards,
Daniel