Reputation: 183
Is there a way to bind a queue to an exchange by the combination of Routing Key plus Header Value(s)?
Thanks
Upvotes: 1
Views: 2845
Reputation: 12859
No, it is not possible to mix routing logic, at least with one exchange (see explanation and workaround below).
Each exchange type has it own routing mechanism, headers
and topic
exchanges (as well as others) logic can't be mixed.
If you really sure you need at the same time routing key and headers routing, you can try to play with Exchange to Exchange binding (here is good explanation how it works: Exchange to Exchange bindings in RabbitMQ blog).
P.S.: But it would be better if you explain what problem you are trying to solve, while it looks like you really complicate things (behavior you've asked about is not very common).
Upvotes: 1