You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Scott Parkerson <sg...@snortasprocket.net> on 2011/08/15 16:07:15 UTC

Semantics of JMSReplyTo between Camel 2.2 and 2.8

Folks,

Somewhere along the way, the semantics of setting the "reply to" in a
message header has changed.

Background: In 2.2.0, I used to be able to send a message to a queue
(specifically, the ActiveMQ.Statistics.Destination.> wildcard queue), which
would trigger n responses, n being the number of configured destinations.
Using the In-Out MEP didn't work, as it seemed to assume that there would be
only one response from the request, grab the first reply, and ignore the
next n-1 replies.

Thus, I came up with using the In-Only MEP, sending to the queue and setting
the JMSReplyTo header to have the responses sent to a topic. The consumer on
that topic would use the Aggregator to aggregate the responses, correlating
them using the JMSCorrelationId, and using a custom aggregation strategy to
create a list of the JMSMapMessages from the statistics query. This worked
fine in 2.2.0, where I set the JMSReplyTo header to "topic://qstats".

In 2.8.0, setting JMSReplyTo to "topic://qstats" creates a _queue_ called
"qstats" rather than a topic.

What changed? Are headers which are considered queues being mangled
differently by the JMS/ActiveMQ component?

Any help would be appreciated!

--sgp

Re: Semantics of JMSReplyTo between Camel 2.2 and 2.8

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Aug 15, 2011 at 4:07 PM, Scott Parkerson <sg...@snortasprocket.net> wrote:
> Folks,
>
> Somewhere along the way, the semantics of setting the "reply to" in a
> message header has changed.
>
> Background: In 2.2.0, I used to be able to send a message to a queue
> (specifically, the ActiveMQ.Statistics.Destination.> wildcard queue), which
> would trigger n responses, n being the number of configured destinations.
> Using the In-Out MEP didn't work, as it seemed to assume that there would be
> only one response from the request, grab the first reply, and ignore the
> next n-1 replies.
>
> Thus, I came up with using the In-Only MEP, sending to the queue and setting
> the JMSReplyTo header to have the responses sent to a topic. The consumer on
> that topic would use the Aggregator to aggregate the responses, correlating
> them using the JMSCorrelationId, and using a custom aggregation strategy to
> create a list of the JMSMapMessages from the statistics query. This worked
> fine in 2.2.0, where I set the JMSReplyTo header to "topic://qstats".
>
> In 2.8.0, setting JMSReplyTo to "topic://qstats" creates a _queue_ called
> "qstats" rather than a topic.
>
> What changed? Are headers which are considered queues being mangled
> differently by the JMS/ActiveMQ component?
>

The replyTo was really ment for queues only.
But I can see your use case is valid, albeit a bit special.

Fell free to create a JIRA ticket, so we support topics again.


> Any help would be appreciated!
>
> --sgp
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/