From the course: Learning RabbitMQ
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
The exchange types - RabbitMQ Tutorial
From the course: Learning RabbitMQ
The exchange types
- [Instructor] Let's have a look at the different types of exchanges that exist in RabbitMQ. There are four different types of exchanges. Direct, Fanout, Topic, and Headers. Each of these types will handle messages and routing keys differently. Direct Exchange will route messages to all queues that have been connected to this exchange with the same routing key as the routing key that the publisher used. In this example, the publisher used the routing key customer.purchase. Let's assume there are two queues that have been bound to this exchange. One with the routing key customer.purchase and the other with customer.registration. Direct Exchange will now route the message to the queue with customer.purchase as a routing key. The other queue will not receive the message. In the case of a Fanout Exchange, messages are routed to all bound queues and the routing key is just ignored. Every queue will receive a copy of the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.