[rabbitmq-discuss] binding

Simon MacMullen simon at rabbitmq.com
Wed Jun 18 16:30:58 BST 2014


On 18/06/14 16:05, PATAR, SAGAR wrote:
> We have a requirement to have a binding on two header fields as below ..
> Not sure if we can do it in one binding instead of breaking into
> multiple bindings
>
> *srcGwyGuId=GGUID1 AND srcOId=OID1 or OID2 or OID3 …..*

The headers exchange does not support arbitrary expressions like that. 
If any community members are feeling enthusiastic then such a thing 
might make a nifty plugin.

> I guess We should be able to get it done with multiple bindings as below …
>
> Binding1: srcGwyGuId=GGUID1 AND srcOId=OID1
>
> Binding2: srcGwyGuId=GGUID1 AND srcOId=OID2
>
> Binding2: srcGwyGuId=GGUID1 AND srcOId=OID3
>
> Please suggest if there is a better way

If your pattern tends to be that you have a few different srcGwyGuIds 
but lots and lots of srcOIds then it might be easier to do it with an 
intermediate exchange for each srcGwyGuId value and then a single bindig 
with x-match=any for each set of srcOids.

> .. If NOT we will end up
> creating thousands of bindings  and NOT sure how many does rabbit MQ
> support??

You might keep an eye on how much memory is used by Mnesia in mgmt / 
"rabbitmqctl status" since all bindings have to live in memory, but I 
think thousands will be fine.

Cheers, Simon

-- 
Simon MacMullen
RabbitMQ, Pivotal


More information about the rabbitmq-discuss mailing list