camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré>
Subject Re: [DISCUSS] - JMSReplyTo to yourself
Date Thu, 20 Jan 2011 06:42:57 GMT
Hi Claus,

most of the time, we have a REQUEST queue and a RESPONSE queue.
I've never seen a response post on the same queue.

By default, it makes sense to log a WARN when posting on the same queue.
The use of disableReplyTo is too restrictive because the users could use 
a replyTo to another queue :)


On 01/20/2011 07:38 AM, Claus Ibsen wrote:
> Hi
> Suppose you have a Camel route
> from("activemq:queue:foo")
>     .process(xxx)
> And a client sends a message to the foo queue with a JMSReplyTo header
> set with the queue:foo destination.
> The client has essentially told to send a reply back to the same queue
> as the message was consumed.
> Currently Camel will happily comply and send a reply message to the
> foo queue. Now what could happen is the message will keep doing this.
> Is there any use-cases in the real life where you want to send a reply
> message back to the same message queue?
> If not we can implement logic to detect this and avoid doing that.
> Camel can log a WARN when it has detect this so
> end users can notice in the logs if they have such a case.
> We can introduce an option so people can turn this odd behavior on and
> allow to send back replies to same queue.
> The current remedy is to enable this option as follows:
> from("activemq:queue:foo?disableReplyTo=true")
>     .process(xxx)
> But that's general so if there was a JMSReplyTo header with the
> queue:bar then it would be ignored as well.
> However sending to a bar queue may be a valid use-case.

View raw message