wildcard binding with direct

392 views
Skip to first unread message

Raymond Rizzuto

unread,
May 21, 2015, 11:59:29 AM5/21/15
to rabbitm...@googlegroups.com
Is there any way to specify that I want to bind a queue to all routing keys on a direct exchange?  I know I can do that with a topic exchange using wildcards, but I don't need anything that flexible, and am worried about the performance of all that wildcard matching.

Skrzypek, Jonathan

unread,
May 21, 2015, 12:01:17 PM5/21/15
to Raymond Rizzuto, rabbitm...@googlegroups.com

In that case you can probably use a fanout exchange, you will receive everything regardless of the routing key.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alvaro Videla

unread,
May 21, 2015, 12:02:14 PM5/21/15
to Raymond Rizzuto, rabbitm...@googlegroups.com
There's no way to do that with a direct exchange. You could try what Skrzypek suggests.

Also see: http://www.rabbitmq.com/blog/2011/03/28/very-fast-and-scalable-topic-routing-part-2/

On Thu, May 21, 2015 at 5:59 PM Raymond Rizzuto <ray.r...@gmail.com> wrote:
Is there any way to specify that I want to bind a queue to all routing keys on a direct exchange?  I know I can do that with a topic exchange using wildcards, but I don't need anything that flexible, and am worried about the performance of all that wildcard matching.

--

Raymond Rizzuto

unread,
May 21, 2015, 12:28:28 PM5/21/15
to rabbitm...@googlegroups.com, ray.r...@gmail.com
Thanks to both of you.

I can't use a fanout because not all queues will bind for everything.   I.e. Q1 may bind for X, Q2 may bind for Y and Q3 binds for everything, which may be a superset of { X Y}.

I'll go with topic.  My patterns will be pretty simple: X, Y and '#'.  I would imagine the matching for these should be pretty fast from the blog description.  Possibly '#' is optimized since no matching at all should be needed.

 
Reply all
Reply to author
Forward
0 new messages