In previous chapters, we learned how to create an exchanges, queues in rabbimq. Now we will learn how to bind an exchange with queue using routing key and this will be used for direct type exchange. In rabbitmq, exchange will route the request to particular queue on the basis of routing key.
To bind a queue to exchange, Go to Queues tab and then click on the queue (demoqueue) which is created like as shown below.
After click on queue (demoqueue) name, the Bindings panel will expand and next it will ask for the exchange name, enter exchange name which we have created “demoexchange” and routing key “demokey” and click on Bind button.
After click on Bind button, the defined exchange (demoexchange) will be bind to our queue (demoqueue) and that will be like as shown below.
After binding, in case if you want to unbind it then you can click on unbind button to remove binding.