7

Suppose, If I have a binding key as "a.b.*" then I can use the routing keys as a.b.1, a.b.2, a.b.3 , a.b.4 and so on.

I want the queue to accept messages from the all these routing keys except the routing key "a.b.3". How can that be implemented?

Or is there any way I can use regex for my binding key instead of just the wildcard characters "*" and "#".

Sagar Rout
  • 651
  • 1
  • 12
  • 29

1 Answers1

11

No; there's no regex, just the two wildcards.

You can use multiple bindings though - you would have to explicitly bind the queue with a.b.1, a.b.3, a.b.4, but then, you might as well just use a direct exchange.

Gary Russell
  • 166,535
  • 14
  • 146
  • 179
  • 3
    in addition to what Gary said, there is not "except" or "not" or "exclude" in routing / binding with rabbitmq. a match is a match and will always route the message. – Derick Bailey Sep 13 '16 at 13:28