camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From souciance <>
Subject Re: RabbitMQ fanout exchange + request-reply + aggergator
Date Mon, 27 Mar 2017 14:58:27 GMT

Your description points to some hybrid between publish/subscribe i.e. you
want to send to multiple consumers and you want responses from them to
aggregate the messages which is more synchronous. I am not sure this is
easily accomplished in one step as the two patterns don't mix in Rabbit as
far as I know. But perhaps someone with better RabbitMQ knowledge can give
more detailed info here. How will you handle timeouts both for the original
caller waiting for the responses and for the clients who will return the

But I think you would probably have to break this in two steps. One part
would be to publish receive the message from the original caller and
publish to the exchange. The clients would have to reply to another routing
key which directs the responses to some fixed queue. You would have to poll
this queue for some xxx period and fetch the messages and aggregate and
then return the aggregated list to the original caller. It sounds a bit


On Mon, Mar 27, 2017 at 3:53 PM, dancsi [via Camel] <> wrote:

> I'd like to implement the request-reply pattern over RabbitMQ the
> following way:
> 1. The request is sent to a RabbitMQ fanout exchange (i.e. it will be
> received by multiple consumers)
> 2. Each consumer prepares and sends its on response (e.g. if they can
> fulfill the given request/order and at what cost)
> 3. The sender route aggregates the responses (e.g. drops responses, where
> the cost is too high and sorts the remaining ones by cost)
> 4. Then return this list to the original caller
> If I use inOut to send out the request to the fanout exchange, Camel will
> create a temporary reply queue with a listener and as soon as the first
> response arrives, it stops listening to further ones and "returns", i.e. it
> isn't possible to aggregate the responses.
> How can I combine inOut with aggregator to realize the expected flow?
> (The only way, I could make it work so far is to use inOnly and set up
> another route to gather and aggregate the responses. But then I cannot
> acknowledge the messages at the end of the entire processing.)
> Cheers
> Andras
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> request-reply-aggergator-tp5796289.html
> To start a new topic under Camel - Users, email
> To unsubscribe from Camel - Users, click here
> <>
> .
> <>

View this message in context:
Sent from the Camel - Users mailing list archive at
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message