camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: request-reply with ActiveMQ and Camel
Date Fri, 13 Feb 2015 05:22:00 GMT
On Thu, Feb 12, 2015 at 6:11 PM, James Green <> wrote:
> I'm guessing you need the reply to include a reference to one or more
> "files" that can be picked up independently? I can't see a multi-message
> reply working. Prepared to be corrected of course.

Correct request/reply with Camel is a 1:1 message.

You can attempt to do 2 routes with one way messaging. One route to
send the initial message. The 2nd route with an aggregator to put
together the N messages that built up that big message. But the 2
routes would become independent.

If you need request/reply with 1:N you would have to build logic for
that - there may be parts of Camel you can reuse for that

> On 12 February 2015 at 16:58, Marco Crivellaro <>
> wrote:
>> Hi,
>> I have managed to get a simple request-reply working with ActiveMQ and
>> Camel/NMS.
>> - The Producer is an NMS client which creates a temporary queue and then
>> sends the request to a queue (queue.request) setting the replyTo header to
>> the temporary queue.
>> - The Consumer is a Java component which uses Camel and InOut pattern which
>> consumes queue.request
>> This setup works fine but I wanted to extend it so that if the response is
>> too big this is split into several chunks and pushed to the temporary
>> queue.
>> So in effect for a request there will be one or more replies.
>> I did not manage to get this working, no matter what I do the consumer
>> always receive the last message pushed to the temporary queue.
>> The java consumer is using a ProducerTemplate to send all the responses bar
>> the last one which is sent as part of the InOut exchange.
>> --
>> View this message in context:
>> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Red Hat, Inc.
Twitter: davsclaus
Author of Camel in Action:

View raw message