[jira] Created: (CAMEL-2249) Wrong handling of useMessageIDAsCorrelationID

by Christian Schneider (JIRA)on 2009-12-02T21:55:17+00:00
Wrong handling of useMessageIDAsCorrelationID
---------------------------------------------
Key: CAMEL-2249
URL: https://issues.apache.org/activemq/browse/CAMEL-2249
Project: Apache Camel
Issue Type: Bug
Affects Versions: 2.0.0
Reporter: Christian Schneider
Camel jms seems to contain two bug in correlation id handling.
The first shows when you have a sender that has UseMessageIDAsCorrelationID=
=3D"false" and a server that has UseMessageIDAsCorrelationID=3D"true". If y=
ou send a message with correlationId=3D"a" then the response message will c=
ontain correlationId=3D"". Even if this could be a vali=
d behaviour as you wanted UseMessageIDAsCorrelationID=3D"true" I don=C2=B4t=
think it makes sense as the sender will not be able to correlate the messa=
ge. So for this case I propose to only set the correlation id to the reques=
t 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 UseMessageIDAs=
CorrelationID=3D"true" on both client and server. If you send a message wit=
h correlation id =3D "a" the client sends it out with this correlation id. =
The server then sets the correlation id to the request message id (first bu=
g). 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 par=
t of the code should be removed.
I have marked both problems in the code with FIXME markers in my patch. I c=
an also provide a patch with the solution but first I wanted to only show t=
he problem and provide a failing test.=20
Hope my explanations were not to confused ;-)
--=20
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

[jira] Updated: (CAMEL-2249) Wrong handling of useMessageIDAsCorrelationID

by Christian Schneider (JIRA)on 2009-12-02T21:57:16+00:00.

[ https://issues.apache.org/activemq/browse/CAMEL-2249?page=3Dcom.atla=
ssian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Schneider updated CAMEL-2249:
---------------------------------------
Attachment: camel-jms-correlation.patch
Patch that shows where the problems are and that contains a currently faili=
ng unit test.=20
> Wrong handling of useMessageIDAsCorrelationID
> ---------------------------------------------
>
> Key: CAMEL-2249
> URL: https://issues.apache.org/activemq/browse/CAMEL-2249
> Project: Apache Camel
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: Christian Schneider
> Attachments: camel-jms-correlation.patch
>
>
> Camel jms seems to contain two bug in correlation id handling.
> The first shows when you have a sender that has UseMessageIDAsCorrelation=
ID=3D"false" and a server that has UseMessageIDAsCorrelationID=3D"true". If=
you send a message with correlationId=3D"a" then the response message will=
contain correlationId=3D"". Even if this could be a va=
lid behaviour as you wanted UseMessageIDAsCorrelationID=3D"true" I don=C2=
=B4t think it makes sense as the sender will not be able to correlate the m=
essage. So for this case I propose to only set the correlation id to the re=
quest 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 UseMessageID=
AsCorrelationID=3D"true" on both client and server. If you send a message w=
ith correlation id =3D "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 p=
art 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.=20
> Hope my explanations were not to confused ;-)
--=20
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

[jira] Issue Comment Edited: (CAMEL-2249) Wrong handling of useMessageIDAsCorrelationID

by Marat Bedretdinov (JIRA)on 2009-12-03T00:27:18+00:00.

[ https://issues.apache.org/activemq/browse/CAMEL-2249?page=3Dcom.atlas=
sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D=
56232#action_56232 ]=20
Marat Bedretdinov edited comment on CAMEL-2249 at 12/2/09 5:26 PM:
-------------------------------------------------------------------
Hi Christian,
I generally agree that JMS Message correlationID value should supersede the=
messageID value. Realize though that both configuration assertions and the=
statement I just made in the previous sentence are all out of band agreeme=
nts. So one can argue either way.
However, let me give you an example when this will break down. Certain brok=
ers, namely IBM MQ will modify your correlationID value using their proprie=
tary encoding. So what you're going to get back in the reply message will b=
e very different from what you set on the request message on the producer s=
ide.
So here the scenario:=20
produce -> 1 -> consume - > produce -> 2 -> consume
--------------- ActiveMQ ------------------------------ IBM MQ
consume consume
ActiveMQ =
IBM MQ
consume

[jira] Commented: (CAMEL-2249) Wrong handling of useMessageIDAsCorrelationID

by Marat Bedretdinov (JIRA)on 2009-12-03T00:27:19+00:00.

[ https://issues.apache.org/activemq/browse/CAMEL-2249?page=3Dcom.atlas=
sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D=
56232#action_56232 ]=20
Marat Bedretdinov commented on CAMEL-2249:
------------------------------------------
Hi Christian,
I generally agree that JMS Message correlationID value should supersede the=
messageID value. Realize though that both configuration assertions and the=
statement I just made in the previous sentence are all out of band agreeme=
nts. So one can argue either way.
However, let me give you an example when this will break down. Certain brok=
ers, namely IBM MQ will modify your correlationID value using their proprie=
tary encoding. So what you're going to get back in the reply message will b=
e very different from what you set on the request message on the producer s=
ide.
So here the scenario:=20
produce -> 1 -> consume - > produce -> 2 -> consume
ActiveMQ =
IBM MQ
consume

[jira] Commented: (CAMEL-2249) Wrong handling of useMessageIDAsCorrelationID

by Christian Schneider (JIRA)on 2009-12-03T06:30:27+00:00.

[ https://issues.apache.org/activemq/browse/CAMEL-2249?page=3Dcom.atlas=
sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D=
56235#action_56235 ]=20
Christian Schneider commented on CAMEL-2249:
--------------------------------------------
I was just browsing the net for some more info. One page is from oracle:
http://download.oracle.com/docs/cd/E13171_01/alsb/docs25/interopjms/MsgIDPa=
tternforJMS.html
There they describe how IBM MQ uses the correlation id. So if the useMessag=
eIdAsCorrelationId was meant in this way it could be correct. Still I would=
rather expect the client to not set a correaltion id if it wants this patt=
ern.=20
The following thread is also interesting: http://www.theserverside.com/disc=
ussions/thread.tss?thread_id=3D44779
It says that the message id of a message can change over it=C2=B4s lifetime=
. So if I understand this correctly it could mean that setting the correlat=
ion id to the message id could fail as this id could be different to the cl=
ient=C2=B4s message id.
=20
> Wrong handling of useMessageIDAsCorrelationID
> ---------------------------------------------
>
> Key: CAMEL-2249
> URL: https://issues.apache.org/activemq/browse/CAMEL-2249
> Project: Apache Camel
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: Christian Schneider
> Attachments: camel-jms-correlation.patch
>
>
> Camel jms seems to contain two bug in correlation id handling.
> The first shows when you have a sender that has UseMessageIDAsCorrelation=
ID=3D"false" and a server that has UseMessageIDAsCorrelationID=3D"true". If=
you send a message with correlationId=3D"a" then the response message will=
contain correlationId=3D"". Even if this could be a va=
lid behaviour as you wanted UseMessageIDAsCorrelationID=3D"true" I don=C2=
=B4t think it makes sense as the sender will not be able to correlate the m=
essage. So for this case I propose to only set the correlation id to the re=
quest 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 UseMessageID=
AsCorrelationID=3D"true" on both client and server. If you send a message w=
ith correlation id =3D "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 p=
art 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.=20
> Hope my explanations were not to confused ;-)
--=20
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

[jira] Commented: (CAMEL-2249) Wrong handling of useMessageIDAsCorrelationID

by Christian Schneider (JIRA)on 2010-01-05T23:20:39+00:00.

[ https://issues.apache.org/activemq/browse/CAMEL-2249?page=3Dcom.atlas=
sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D=
56775#action_56775 ]=20
Christian Schneider commented on CAMEL-2249:
--------------------------------------------
Are there any news about this issue? We still have the incompatibility betw=
een CXF / Camel and pure CXF. I can help some more by providing a complete =
patch with a solution. It would help me though if we could discuss how the =
"useMessageIdAsCorrelationId" feature should behave before I do the coding.
Especially I need to know if the correlation id of the incoming message sho=
uld be used as correlation id in the reply instead of the messageId if it i=
s set.
> Wrong handling of useMessageIDAsCorrelationID
> ---------------------------------------------
>
> Key: CAMEL-2249
> URL: https://issues.apache.org/activemq/browse/CAMEL-2249
> Project: Apache Camel
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: Christian Schneider
> Attachments: camel-jms-correlation.patch
>
>
> Camel jms seems to contain two bug in correlation id handling.
> The first shows when you have a sender that has UseMessageIDAsCorrelation=
ID=3D"false" and a server that has UseMessageIDAsCorrelationID=3D"true". If=
you send a message with correlationId=3D"a" then the response message will=
contain correlationId=3D"". Even if this could be a va=
lid behaviour as you wanted UseMessageIDAsCorrelationID=3D"true" I don=C2=
=B4t think it makes sense as the sender will not be able to correlate the m=
essage. So for this case I propose to only set the correlation id to the re=
quest 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 UseMessageID=
AsCorrelationID=3D"true" on both client and server. If you send a message w=
ith correlation id =3D "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 p=
art 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.=20
> Hope my explanations were not to confused ;-)
--=20
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

[jira] Commented: (CAMEL-2249) Wrong handling of useMessageIDAsCorrelationID

by David J. M. Karlsen (JIRA)on 2010-01-05T23:32:37+00:00.

[ https://issues.apache.org/activemq/browse/CAMEL-2249?page=3Dcom.atlas=
sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D=
56776#action_56776 ]=20
David J. M. Karlsen commented on CAMEL-2249:
--------------------------------------------
How about making it configurable, but with Collection by MessageID as defau=
lt.
(And act according to the "spec" in oracle link).
This is the pattern I've seen most widespread and how I used it for JMS/MQ/=
zOS integration.
"Correlation by MessageID is commonly used by many IBM MQ applications as w=
ell as JMS applications and is the standard method to correlate request and=
response."
> Wrong handling of useMessageIDAsCorrelationID
> ---------------------------------------------
>
> Key: CAMEL-2249
> URL: https://issues.apache.org/activemq/browse/CAMEL-2249
> Project: Apache Camel
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: Christian Schneider
> Attachments: camel-jms-correlation.patch
>
>
> Camel jms seems to contain two bug in correlation id handling.
> The first shows when you have a sender that has UseMessageIDAsCorrelation=
ID=3D"false" and a server that has UseMessageIDAsCorrelationID=3D"true". If=
you send a message with correlationId=3D"a" then the response message will=
contain correlationId=3D"". Even if this could be a va=
lid behaviour as you wanted UseMessageIDAsCorrelationID=3D"true" I don=C2=
=B4t think it makes sense as the sender will not be able to correlate the m=
essage. So for this case I propose to only set the correlation id to the re=
quest 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 UseMessageID=
AsCorrelationID=3D"true" on both client and server. If you send a message w=
ith correlation id =3D "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 p=
art 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.=20
> Hope my explanations were not to confused ;-)
--=20
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

[jira] Commented: (CAMEL-2249) Wrong handling of useMessageIDAsCorrelationID

by Christian Schneider (JIRA)on 2010-01-06T08:43:37+00:00.

[ https://issues.apache.org/activemq/browse/CAMEL-2249?page=3Dcom.atlas=
sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D=
56781#action_56781 ]=20
Christian Schneider commented on CAMEL-2249:
--------------------------------------------
I also like using the messageId for correaltion. The question is what to do=
when the sender already has set a correlation id. Currently camel will dis=
card the correlation id and still set the message id as correaltion id of t=
he response. I think this is wrong as the sender expresses that he expects =
to get the correlation id back that he set on the request message. =20
So I think we can do one of two things to correct this:
The first way is to always use the correlation id of the request if it was =
set.
The second way could be to add a config option that controls if the above b=
ehaviour should be actived.
Which solution should be done? Are there other possible solutions?
> Wrong handling of useMessageIDAsCorrelationID
> ---------------------------------------------
>
> Key: CAMEL-2249
> URL: https://issues.apache.org/activemq/browse/CAMEL-2249
> Project: Apache Camel
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: Christian Schneider
> Attachments: camel-jms-correlation.patch
>
>
> Camel jms seems to contain two bug in correlation id handling.
> The first shows when you have a sender that has UseMessageIDAsCorrelation=
ID=3D"false" and a server that has UseMessageIDAsCorrelationID=3D"true". If=
you send a message with correlationId=3D"a" then the response message will=
contain correlationId=3D"". Even if this could be a va=
lid behaviour as you wanted UseMessageIDAsCorrelationID=3D"true" I don=C2=
=B4t think it makes sense as the sender will not be able to correlate the m=
essage. So for this case I propose to only set the correlation id to the re=
quest 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 UseMessageID=
AsCorrelationID=3D"true" on both client and server. If you send a message w=
ith correlation id =3D "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 p=
art 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.=20
> Hope my explanations were not to confused ;-)
--=20
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

[jira] Commented: (CAMEL-2249) Wrong handling of useMessageIDAsCorrelationID

by Claus Ibsen (JIRA)on 2010-01-06T10:44:05+00:00.

[ https://issues.apache.org/activemq/browse/CAMEL-2249?page=3Dcom.atlas=
sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D=
56783#action_56783 ]=20
Claus Ibsen commented on CAMEL-2249:
------------------------------------
SI is also discussing a similar issue at their forum
http://forum.springsource.org/showthread.php?t=3D82368
> Wrong handling of useMessageIDAsCorrelationID
> ---------------------------------------------
>
> Key: CAMEL-2249
> URL: https://issues.apache.org/activemq/browse/CAMEL-2249
> Project: Apache Camel
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: Christian Schneider
> Attachments: camel-jms-correlation.patch
>
>
> Camel jms seems to contain two bug in correlation id handling.
> The first shows when you have a sender that has UseMessageIDAsCorrelation=
ID=3D"false" and a server that has UseMessageIDAsCorrelationID=3D"true". If=
you send a message with correlationId=3D"a" then the response message will=
contain correlationId=3D"". Even if this could be a va=
lid behaviour as you wanted UseMessageIDAsCorrelationID=3D"true" I don=C2=
=B4t think it makes sense as the sender will not be able to correlate the m=
essage. So for this case I propose to only set the correlation id to the re=
quest 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 UseMessageID=
AsCorrelationID=3D"true" on both client and server. If you send a message w=
ith correlation id =3D "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 p=
art 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.=20
> Hope my explanations were not to confused ;-)
--=20
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

[jira] Commented: (CAMEL-2249) Wrong handling of useMessageIDAsCorrelationID

by David J. M. Karlsen (JIRA)on 2010-01-06T11:05:39+00:00.

[ https://issues.apache.org/activemq/browse/CAMEL-2249?page=3Dcom.atlas=
sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D=
56784#action_56784 ]=20
David J. M. Karlsen commented on CAMEL-2249:
--------------------------------------------
I'd say make it configurable - it shouldn't be a lot of work to support bot=
h "protocols".
Log warnings if correlationId is set when not expected etc.
> Wrong handling of useMessageIDAsCorrelationID
> ---------------------------------------------
>
> Key: CAMEL-2249
> URL: https://issues.apache.org/activemq/browse/CAMEL-2249
> Project: Apache Camel
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: Christian Schneider
> Attachments: camel-jms-correlation.patch
>
>
> Camel jms seems to contain two bug in correlation id handling.
> The first shows when you have a sender that has UseMessageIDAsCorrelation=
ID=3D"false" and a server that has UseMessageIDAsCorrelationID=3D"true". If=
you send a message with correlationId=3D"a" then the response message will=
contain correlationId=3D"". Even if this could be a va=
lid behaviour as you wanted UseMessageIDAsCorrelationID=3D"true" I don=C2=
=B4t think it makes sense as the sender will not be able to correlate the m=
essage. So for this case I propose to only set the correlation id to the re=
quest 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 UseMessageID=
AsCorrelationID=3D"true" on both client and server. If you send a message w=
ith correlation id =3D "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 p=
art 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.=20
> Hope my explanations were not to confused ;-)
--=20
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

[jira] Commented: (CAMEL-2249) Wrong handling of useMessageIDAsCorrelationID

by Claus Ibsen (JIRA)on 2010-01-07T10:34:38+00:00.

[ https://issues.apache.org/activemq/browse/CAMEL-2249?page=3Dcom.atlas=
sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D=
56806#action_56806 ]=20
Claus Ibsen commented on CAMEL-2249:
------------------------------------
Yeah add an option to control the desired behavior.
And remember we need unit tests to cover this as JMS is always tricky
> Wrong handling of useMessageIDAsCorrelationID
> ---------------------------------------------
>
> Key: CAMEL-2249
> URL: https://issues.apache.org/activemq/browse/CAMEL-2249
> Project: Apache Camel
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: Christian Schneider
> Attachments: camel-jms-correlation.patch
>
>
> Camel jms seems to contain two bug in correlation id handling.
> The first shows when you have a sender that has UseMessageIDAsCorrelation=
ID=3D"false" and a server that has UseMessageIDAsCorrelationID=3D"true". If=
you send a message with correlationId=3D"a" then the response message will=
contain correlationId=3D"". Even if this could be a va=
lid behaviour as you wanted UseMessageIDAsCorrelationID=3D"true" I don=C2=
=B4t think it makes sense as the sender will not be able to correlate the m=
essage. So for this case I propose to only set the correlation id to the re=
quest 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 UseMessageID=
AsCorrelationID=3D"true" on both client and server. If you send a message w=
ith correlation id =3D "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 p=
art 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.=20
> Hope my explanations were not to confused ;-)
--=20
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

[jira] Updated: (CAMEL-2249) Wrong handling of useMessageIDAsCorrelationID

by Christian Schneider (JIRA)on 2010-01-08T07:07:39+00:00.

[ https://issues.apache.org/activemq/browse/CAMEL-2249?page=3Dcom.atla=
ssian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Schneider updated CAMEL-2249:
---------------------------------------
Attachment: camel-jms-2010-01-08.patch
Added a fix and test. If useMessageId as correlationId is true then the cor=
relationId is still forced to be the messageId. The difference now is that =
when useMessageIdasCorrelationId is false and the incoming correlationid is=
not set then the correlationId is set to the messageId (as a fallback).
> Wrong handling of useMessageIDAsCorrelationID
> ---------------------------------------------
>
> Key: CAMEL-2249
> URL: https://issues.apache.org/activemq/browse/CAMEL-2249
> Project: Apache Camel
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: Christian Schneider
> Attachments: camel-jms-2010-01-08.patch, camel-jms-correlation.pa=
tch
>
>
> Camel jms seems to contain two bug in correlation id handling.
> The first shows when you have a sender that has UseMessageIDAsCorrelation=
ID=3D"false" and a server that has UseMessageIDAsCorrelationID=3D"true". If=
you send a message with correlationId=3D"a" then the response message will=
contain correlationId=3D"". Even if this could be a va=
lid behaviour as you wanted UseMessageIDAsCorrelationID=3D"true" I don=C2=
=B4t think it makes sense as the sender will not be able to correlate the m=
essage. So for this case I propose to only set the correlation id to the re=
quest 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 UseMessageID=
AsCorrelationID=3D"true" on both client and server. If you send a message w=
ith correlation id =3D "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 p=
art 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.=20
> Hope my explanations were not to confused ;-)
--=20
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

[jira] Assigned: (CAMEL-2249) Wrong handling of useMessageIDAsCorrelationID

by Claus Ibsen (JIRA)on 2010-01-08T08:19:46+00:00.

[ https://issues.apache.org/activemq/browse/CAMEL-2249?page=3Dcom.atla=
ssian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-2249:
----------------------------------
Assignee: Claus Ibsen
> Wrong handling of useMessageIDAsCorrelationID
> ---------------------------------------------
>
> Key: CAMEL-2249
> URL: https://issues.apache.org/activemq/browse/CAMEL-2249
> Project: Apache Camel
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: Christian Schneider
> Assignee: Claus Ibsen
> Attachments: camel-jms-2010-01-08.patch, camel-jms-correlation.pa=
tch
>
>
> Camel jms seems to contain two bug in correlation id handling.
> The first shows when you have a sender that has UseMessageIDAsCorrelation=
ID=3D"false" and a server that has UseMessageIDAsCorrelationID=3D"true". If=
you send a message with correlationId=3D"a" then the response message will=
contain correlationId=3D"". Even if this could be a va=
lid behaviour as you wanted UseMessageIDAsCorrelationID=3D"true" I don=C2=
=B4t think it makes sense as the sender will not be able to correlate the m=
essage. So for this case I propose to only set the correlation id to the re=
quest 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 UseMessageID=
AsCorrelationID=3D"true" on both client and server. If you send a message w=
ith correlation id =3D "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 p=
art 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.=20
> Hope my explanations were not to confused ;-)
--=20
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

[jira] Resolved: (CAMEL-2249) Wrong handling of useMessageIDAsCorrelationID

by Claus Ibsen (JIRA)on 2010-01-08T09:34:55+00:00.

[ https://issues.apache.org/activemq/browse/CAMEL-2249?page=3Dcom.atla=
ssian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-2249.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.2.0
trunk: 897159.
Thanks for the patch Christian.
> Wrong handling of useMessageIDAsCorrelationID
> ---------------------------------------------
>
> Key: CAMEL-2249
> URL: https://issues.apache.org/activemq/browse/CAMEL-2249
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-jms
> Affects Versions: 2.0.0
> Reporter: Christian Schneider
> Assignee: Claus Ibsen
> Fix For: 2.2.0
>
> Attachments: camel-jms-2010-01-08.patch, camel-jms-correlation.pa=
tch
>
>
> Camel jms seems to contain two bug in correlation id handling.
> The first shows when you have a sender that has UseMessageIDAsCorrelation=
ID=3D"false" and a server that has UseMessageIDAsCorrelationID=3D"true". If=
you send a message with correlationId=3D"a" then the response message will=
contain correlationId=3D"". Even if this could be a va=
lid behaviour as you wanted UseMessageIDAsCorrelationID=3D"true" I don=C2=
=B4t think it makes sense as the sender will not be able to correlate the m=
essage. So for this case I propose to only set the correlation id to the re=
quest 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 UseMessageID=
AsCorrelationID=3D"true" on both client and server. If you send a message w=
ith correlation id =3D "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 p=
art 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.=20
> Hope my explanations were not to confused ;-)
--=20
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

[jira] Updated: (CAMEL-2249) Wrong handling of useMessageIDAsCorrelationID

by Claus Ibsen (JIRA)on 2010-01-08T09:34:58+00:00.

[ https://issues.apache.org/activemq/browse/CAMEL-2249?page=3Dcom.atla=
ssian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-2249:
-------------------------------
Component/s: camel-jms
> Wrong handling of useMessageIDAsCorrelationID
> ---------------------------------------------
>
> Key: CAMEL-2249
> URL: https://issues.apache.org/activemq/browse/CAMEL-2249
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-jms
> Affects Versions: 2.0.0
> Reporter: Christian Schneider
> Assignee: Claus Ibsen
> Fix For: 2.2.0
>
> Attachments: camel-jms-2010-01-08.patch, camel-jms-correlation.pa=
tch
>
>
> Camel jms seems to contain two bug in correlation id handling.
> The first shows when you have a sender that has UseMessageIDAsCorrelation=
ID=3D"false" and a server that has UseMessageIDAsCorrelationID=3D"true". If=
you send a message with correlationId=3D"a" then the response message will=
contain correlationId=3D"". Even if this could be a va=
lid behaviour as you wanted UseMessageIDAsCorrelationID=3D"true" I don=C2=
=B4t think it makes sense as the sender will not be able to correlate the m=
essage. So for this case I propose to only set the correlation id to the re=
quest 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 UseMessageID=
AsCorrelationID=3D"true" on both client and server. If you send a message w=
ith correlation id =3D "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 p=
art 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.=20
> Hope my explanations were not to confused ;-)
--=20
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

[jira] Updated: (CAMEL-2249) Wrong handling of useMessageIDAsCorrelationID

by Christian Schneider (JIRA)on 2010-01-08T09:40:41+00:00.

[ https://issues.apache.org/activemq/browse/CAMEL-2249?page=3Dcom.atla=
ssian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Schneider updated CAMEL-2249:
---------------------------------------
Description:=20
Camel jms seems to contain two bugs in correlation id handling.
The first shows when you have a sender that has UseMessageIDAsCorrelationID=
=3D"false" and a server that has UseMessageIDAsCorrelationID=3D"true". If y=
ou send a message with correlationId=3D"a" then the response message will c=
ontain correlationId=3D"". Even if this could be a vali=
d behaviour as you wanted UseMessageIDAsCorrelationID=3D"true" I don=C2=B4t=
think it makes sense as the sender will not be able to correlate the messa=
ge. So for this case I propose to only set the correlation id to the reques=
t 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 UseMessageIDAs=
CorrelationID=3D"true" on both client and server. If you send a message wit=
h correlation id =3D "a" the client sends it out with this correlation id. =
The server then sets the correlation id to the request message id (first bu=
g). 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 par=
t of the code should be removed.
I have marked both problems in the code with FIXME markers in my patch. I c=
an also provide a patch with the solution but first I wanted to only show t=
he problem and provide a failing test.=20
Hope my explanations were not to confused ;-)
was:
Camel jms seems to contain two bug in correlation id handling.
The first shows when you have a sender that has UseMessageIDAsCorrelationID=
=3D"false" and a server that has UseMessageIDAsCorrelationID=3D"true". If y=
ou send a message with correlationId=3D"a" then the response message will c=
ontain correlationId=3D"". Even if this could be a vali=
d behaviour as you wanted UseMessageIDAsCorrelationID=3D"true" I don=C2=B4t=
think it makes sense as the sender will not be able to correlate the messa=
ge. So for this case I propose to only set the correlation id to the reques=
t 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 UseMessageIDAs=
CorrelationID=3D"true" on both client and server. If you send a message wit=
h correlation id =3D "a" the client sends it out with this correlation id. =
The server then sets the correlation id to the request message id (first bu=
g). 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 par=
t of the code should be removed.
I have marked both problems in the code with FIXME markers in my patch. I c=
an also provide a patch with the solution but first I wanted to only show t=
he problem and provide a failing test.=20
Hope my explanations were not to confused ;-)
> Wrong handling of useMessageIDAsCorrelationID
> ---------------------------------------------
>
> Key: CAMEL-2249
> URL: https://issues.apache.org/activemq/browse/CAMEL-2249
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-jms
> Affects Versions: 2.0.0
> Reporter: Christian Schneider
> Assignee: Claus Ibsen
> Fix For: 2.2.0
>
> Attachments: camel-jms-2010-01-08.patch, camel-jms-correlation.pa=
tch
>
>
> Camel jms seems to contain two bugs in correlation id handling.
> The first shows when you have a sender that has UseMessageIDAsCorrelation=
ID=3D"false" and a server that has UseMessageIDAsCorrelationID=3D"true". If=
you send a message with correlationId=3D"a" then the response message will=
contain correlationId=3D"". Even if this could be a va=
lid behaviour as you wanted UseMessageIDAsCorrelationID=3D"true" I don=C2=
=B4t think it makes sense as the sender will not be able to correlate the m=
essage. So for this case I propose to only set the correlation id to the re=
quest 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 UseMessageID=
AsCorrelationID=3D"true" on both client and server. If you send a message w=
ith correlation id =3D "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 p=
art 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.=20
> Hope my explanations were not to confused ;-)
--=20
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

[jira] Commented: (CAMEL-2249) Wrong handling of useMessageIDAsCorrelationID

by Christian Schneider (JIRA)on 2010-01-08T14:21:39+00:00.

[ https://issues.apache.org/activemq/browse/CAMEL-2249?page=3Dcom.atlas=
sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D=
56839#action_56839 ]=20
Christian Schneider commented on CAMEL-2249:
--------------------------------------------
Did you have the chance to look into the code block I removed from the JmsP=
roducer
// FIXME remove: I think this does not make sense
+// if (correlationId !=3D null) {
+// message.setJMSCorrelationID(correlationId);
+// exchange.getOut().setHeader("JMSCorrelationID", corr=
elationId);
+// }
It looked wrong to me to set the incoming correlation id to something diffe=
rent but perhaps it has some reason I did not understand.
> Wrong handling of useMessageIDAsCorrelationID
> ---------------------------------------------
>
> Key: CAMEL-2249
> URL: https://issues.apache.org/activemq/browse/CAMEL-2249
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-jms
> Affects Versions: 2.0.0
> Reporter: Christian Schneider
> Assignee: Claus Ibsen
> Fix For: 2.2.0
>
> Attachments: camel-jms-2010-01-08.patch, camel-jms-correlation.pa=
tch
>
>
> Camel jms seems to contain two bugs in correlation id handling.
> The first shows when you have a sender that has UseMessageIDAsCorrelation=
ID=3D"false" and a server that has UseMessageIDAsCorrelationID=3D"true". If=
you send a message with correlationId=3D"a" then the response message will=
contain correlationId=3D"". Even if this could be a va=
lid behaviour as you wanted UseMessageIDAsCorrelationID=3D"true" I don=C2=
=B4t think it makes sense as the sender will not be able to correlate the m=
essage. So for this case I propose to only set the correlation id to the re=
quest 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 UseMessageID=
AsCorrelationID=3D"true" on both client and server. If you send a message w=
ith correlation id =3D "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 p=
art 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.=20
> Hope my explanations were not to confused ;-)
--=20
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

[jira] Closed: (CAMEL-2249) Wrong handling of useMessageIDAsCorrelationID

by Christian Schneider (JIRA)on 2010-01-08T14:25:38+00:00.

[ https://issues.apache.org/activemq/browse/CAMEL-2249?page=3Dcom.atla=
ssian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Schneider closed CAMEL-2249.
--------------------------------------
> Wrong handling of useMessageIDAsCorrelationID
> ---------------------------------------------
>
> Key: CAMEL-2249
> URL: https://issues.apache.org/activemq/browse/CAMEL-2249
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-jms
> Affects Versions: 2.0.0
> Reporter: Christian Schneider
> Assignee: Claus Ibsen
> Fix For: 2.2.0
>
> Attachments: camel-jms-2010-01-08.patch, camel-jms-correlation.pa=
tch
>
>
> Camel jms seems to contain two bugs in correlation id handling.
> The first shows when you have a sender that has UseMessageIDAsCorrelation=
ID=3D"false" and a server that has UseMessageIDAsCorrelationID=3D"true". If=
you send a message with correlationId=3D"a" then the response message will=
contain correlationId=3D"". Even if this could be a va=
lid behaviour as you wanted UseMessageIDAsCorrelationID=3D"true" I don=C2=
=B4t think it makes sense as the sender will not be able to correlate the m=
essage. So for this case I propose to only set the correlation id to the re=
quest 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 UseMessageID=
AsCorrelationID=3D"true" on both client and server. If you send a message w=
ith correlation id =3D "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 p=
art 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.=20
> Hope my explanations were not to confused ;-)
--=20
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

[jira] Commented: (CAMEL-2249) Wrong handling of useMessageIDAsCorrelationID

by Christian Schneider (JIRA)on 2010-01-08T14:25:40+00:00.

[ https://issues.apache.org/activemq/browse/CAMEL-2249?page=3Dcom.atlas=
sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D=
56840#action_56840 ]=20
Christian Schneider commented on CAMEL-2249:
--------------------------------------------
I just looked into the code you committed and the comment explained what th=
e code block was good for. So I guess my question is answered.
> Wrong handling of useMessageIDAsCorrelationID
> ---------------------------------------------
>
> Key: CAMEL-2249
> URL: https://issues.apache.org/activemq/browse/CAMEL-2249
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-jms
> Affects Versions: 2.0.0
> Reporter: Christian Schneider
> Assignee: Claus Ibsen
> Fix For: 2.2.0
>
> Attachments: camel-jms-2010-01-08.patch, camel-jms-correlation.pa=
tch
>
>
> Camel jms seems to contain two bugs in correlation id handling.
> The first shows when you have a sender that has UseMessageIDAsCorrelation=
ID=3D"false" and a server that has UseMessageIDAsCorrelationID=3D"true". If=
you send a message with correlationId=3D"a" then the response message will=
contain correlationId=3D"". Even if this could be a va=
lid behaviour as you wanted UseMessageIDAsCorrelationID=3D"true" I don=C2=
=B4t think it makes sense as the sender will not be able to correlate the m=
essage. So for this case I propose to only set the correlation id to the re=
quest 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 UseMessageID=
AsCorrelationID=3D"true" on both client and server. If you send a message w=
ith correlation id =3D "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 p=
art 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.=20
> Hope my explanations were not to confused ;-)
--=20
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.