camel-users mailing list archives

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

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
result?

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
messy.

Best
Souciance

On Mon, Mar 27, 2017 at 3:53 PM, dancsi [via Camel] <
ml-node+s465427n5796289h22@n5.nabble.com> 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:
> http://camel.465427.n5.nabble.com/RabbitMQ-fanout-exchange-
> request-reply-aggergator-tp5796289.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428h31@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/RabbitMQ-fanout-exchange-request-reply-aggergator-tp5796289p5796295.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message