Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RabbitMQ Headers Exchange where X-Match equals any

Can someone explain why this is happening?

I have created a headers exchange and bound it to three queues with different arguments as following:

enter image description here

Then I try to publish a message where any queue with format: pdf would receive it, like this:

enter image description here

But the exchange seems to not be able to route it to the proper queues, as I get the following message:

enter image description here

Since I can't find people with the same problem as I have, it might be something I am doing wrong here

Note that, for instance, if I send x-match:all, format: pdf and type: report, the queue test-queue-A gets it normally

like image 804
Matheus Medeiros Avatar asked Dec 11 '25 08:12

Matheus Medeiros


1 Answers

Could be I'm misunderstanding the various pictures you provided in your description, but based on the info available here

It seems like you're adding the x-match=any to the headers of your message, while it's expected in the binding between your exchange and your queue.

It indicates how the binding works:

Either any common header between the message and the binding count as a match,

Or all the headers referenced in the binding need to be present in the message for it to match.

like image 175
Olivier Avatar answered Dec 14 '25 05:12

Olivier



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!