[rabbitmq-discuss] A few questions about RabbitMQ and the .NET Client

Matthew Sackman matthew at rabbitmq.com
Mon Sep 5 15:08:34 BST 2011


On Fri, Sep 02, 2011 at 08:59:07AM +0100, Matthias Radestock wrote:
> With 'all' and 'any' you get the choice of conjunction or
> disjunction, i.e. you can express "Match all these headers" or
> "Match any of these headers"
> 
> By introducing intermediate exchanges you can express conjunctions
> of disjunctions, i.e. "Match any of these headers AND match any of
> these headers AND ...".

So that looks like  --> e1 --> e2 --> e3 --> q
where each of e1 e2 and e3 are header exchanges with 'any'. But you can
also do a disjunction of conjunctions by putting them in parallel:

       /---> e1 ---\
      /             \
 --> e ----> e2 ---> e ---> q
      \             /
       \---> e3 ---/

Where both 'e's are just fanout exchanges. Then e1, e2 and e3 are header
exchanges with 'all'. And yes, Rabbit does duplication checks - even if
several of e1 e2 and e3 pass the message through, only 1 copy of each
message can arrive at q.

Exchange-to-exchange bindings really increase the power of routing logic
substantially, and help make up for some oversights of exchange types.

Matthew


More information about the rabbitmq-discuss mailing list