You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Christian Schneider <ch...@die-schneider.net> on 2009/12/02 08:26:55 UTC

Potential bug in camel jms

Hi,

I am using the camel jms component to do soap/jms. I was using the 
option useMessageIDAsCorrelationID=true. This way Iwanted my client to 
set the message id as correlation id when doing a request.
This worked well.

The problem was that when the same jms component was used as a server 
this option was also effective. When the client sent in a message with a 
correlation id that did not match the message id then the camel server 
component still sent the message back with correlation id set to the 
message id. I think in the server case this is wrong. When the server 
receives a message with a correlation id set it should reply with the 
same correlation id. Am I correct here?

In any case it was easy to solve thee problem by simply turning this 
option off but I still think this is a bug.

If necessary I can provide an example project.

Greetings

Christian

-- 

Christian Schneider
---
http://www.liquid-reality.de


Re: Potential bug in camel jms

Posted by Christian Schneider <ch...@die-schneider.net>.
Hi Claus,

I think I found the problem(s) in the code. Seems the bug did not show 
as a second bug was hiding it.
To make this easier to track I created a jira issue : 
https://issues.apache.org/activemq/browse/CAMEL-2249

I was also able to create a failing test case.

Greetings

Christian


Claus Ibsen schrieb:
> Hi
>
> On Wed, Dec 2, 2009 at 8:26 AM, Christian Schneider
> <ch...@die-schneider.net> wrote:
>   
>> Hi,
>>
>> I am using the camel jms component to do soap/jms. I was using the option
>> useMessageIDAsCorrelationID=true. This way Iwanted my client to set the
>> message id as correlation id when doing a request.
>> This worked well.
>>
>> The problem was that when the same jms component was used as a server this
>> option was also effective. When the client sent in a message with a
>> correlation id that did not match the message id then the camel server
>> component still sent the message back with correlation id set to the message
>> id. I think in the server case this is wrong. When the server receives a
>> message with a correlation id set it should reply with the same correlation
>> id. Am I correct here?
>>
>>     
>
> Yeah that makes sense. Cant see how the client would know its the
> right reply. Although often Camel uses a temporary queue which means
> that there is one one consumer.
> But for a dedicated ReplyTo queue I would assume that correlation id
> should match.
>
>
>   
>> In any case it was easy to solve thee problem by simply turning this option
>> off but I still think this is a bug.
>>
>>     
>
> Could be.
>
>
>   
>> If necessary I can provide an example project.
>>
>>     
>
> Yeah an unit test would be preferred.
>
>
>   
>> Greetings
>>
>> Christian
>>
>> --
>>
>> Christian Schneider
>> ---
>> http://www.liquid-reality.de
>>
>>
>>     
>
>
>
>   


-- 

Christian Schneider
---
http://www.liquid-reality.de


Re: Potential bug in camel jms

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

On Wed, Dec 2, 2009 at 8:26 AM, Christian Schneider
<ch...@die-schneider.net> wrote:
> Hi,
>
> I am using the camel jms component to do soap/jms. I was using the option
> useMessageIDAsCorrelationID=true. This way Iwanted my client to set the
> message id as correlation id when doing a request.
> This worked well.
>
> The problem was that when the same jms component was used as a server this
> option was also effective. When the client sent in a message with a
> correlation id that did not match the message id then the camel server
> component still sent the message back with correlation id set to the message
> id. I think in the server case this is wrong. When the server receives a
> message with a correlation id set it should reply with the same correlation
> id. Am I correct here?
>

Yeah that makes sense. Cant see how the client would know its the
right reply. Although often Camel uses a temporary queue which means
that there is one one consumer.
But for a dedicated ReplyTo queue I would assume that correlation id
should match.


> In any case it was easy to solve thee problem by simply turning this option
> off but I still think this is a bug.
>

Could be.


> If necessary I can provide an example project.
>

Yeah an unit test would be preferred.


> Greetings
>
> Christian
>
> --
>
> Christian Schneider
> ---
> http://www.liquid-reality.de
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus