camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: set jms reply to in message header
Date Fri, 27 May 2011 01:29:03 GMT
Hi Jim,

Claus give some inputs on the CAMEL-4008, one of his concern is letting 
the user setting the ReplyTo property will cause some memory leak, as 
camel-jms will start a jms listener per reply queue and only release it 
when the camel context is shut down,

I don't know why you want to set the ReplyTo property at the run time, 
it will not affect the JMS consumer as the ReplyTo will be set with a 
tempera queue name by default. And You can also set the ReplyTo to 
persistent queue through the JMS URI option, if you want to use 
persistent queue to store the reply message.

So I'm afraid I had to revert the change shortly.

Any thought ?

On 5/24/11 5:13 PM, Willem Jiang wrote:
> Hi,
>
> I created a JIRA[1] for this issue, and also committed quick fix for it.
> It should be part of Camel 2.8.0, and you can using header name
> "camelJmsReplyTo" to set the jms replyTo property.
>
> [1]https://issues.apache.org/jira/browse/CAMEL-4008
>
> On 5/24/11 12:47 PM, Willem Jiang wrote:
>> I can reproduce the error and will dig the code for it.
>>
>> On 5/24/11 11:29 AM, Jim Newsham wrote:
>>>
>>> I have tried "queue:myqueue" and the result is the same. I tried both:
>>>
>>> //exchange.getIn().setHeader("JMSReplyTo",
>>> ActiveMQConverter.toDestination("queue:myqueue"));
>>> exchange.getIn().setHeader("JMSReplyTo", "queue:myqueue");
>>>
>>> Thanks,
>>> Jim
>>>
>>> On 5/23/2011 5:21 PM, Willem Jiang wrote:
>>>> Hi,
>>>>
>>>> Can you change the queue name to queue:myqueue?
>>>>
>>>> On 5/24/11 11:13 AM, Jim Newsham wrote:
>>>>>
>>>>> Hi Willem,
>>>>>
>>>>> Unfortunately I do not know the reply-to queue name at the time the
>>>>> route is created, which is why I hoped to set the reply-to header
>>>>> dynamically. Are you saying that my example should work if I used a
>>>>> javax.jms.Destination? I have tried the following but the result is
>>>>> the
>>>>> same as before.
>>>>>
>>>>> public void process(Exchange exchange) throws Exception {
>>>>> exchange.getIn().setHeader("JMSReplyTo",
>>>>> ActiveMQConverter.toDestination("queue://myqueue"));
>>>>> }
>>>>>
>>>>> Thanks,
>>>>> Jim
>>>>
>>>>
>>>
>>>
>>
>>
>
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Connect at CamelOne May 24-26
The Open Source Integration Conference
http://camelone.com

Mime
View raw message