How can I clear all routing key binding from a queue in rabbitmq?
The QueueUnbind method need the routingkey parameter, but I just want to clear all bindings.
AMQP does not allow you to do this. According to this discussion, you can workaround this by having an intermediate exchange.
Basically, you create a fanout exchange which connects directly to the exchange you are interested in. You have clients which binds queues to this intermediate exchange. When you decide you want to clear all the queues, you can simply destroy this intermediate exchange.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With