Have a look at the camel aggregator EIP [1].  You can receive messages from
your JMS response queue and then use the JMSCorrelationID header value in
your aggregation expression.  Note that you will need to select and
configure an aggregation strategy.  For example, if you want to use a 5
second timeout for receiving responses you could do something like this:

  from("jms:yourResponseQueue").
     aggregate(header("JMSCorrelationID",

newBodyInAggregatingStrategy()).completionTimeout(5000).to("someUri:yourTargetEndpoint");

[1] http://camel.apache.org/aggregator2.html


On Thu, Dec 15, 2011 at 4:34 AM, xiangqiuzhao <xiangqiuz...@gmail.com>wrote:

> system A send request to system B, communicate to system B use IBM MQ. and
> received response from system B and return to A.
>
> request to B use Queue1 and receive response from Queue2, response may be
> one, or twice, or more times.
>
> so how to sync recevied the all response in use camel-jms?
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/how-to-use-jms-to-sync-twice-response-tp5077335p5077335.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to