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.
Filter messages with topic exchanges - RabbitMQ Tutorial
From the course: Learning RabbitMQ
Filter messages with topic exchanges
- [Instructor] The topic exchange allows for fine-grained filtering of messages based on the routing key that is sent along with the message. We currently have a web application that sends out two types of messages. One with the routing key tour.booked, and another with tour.cancelled. With a direct exchange, we were able to filter out the tour.cancelled messages. Our email service will only receive messages where the routing key matches tour.booked exactly. What if we have another service, that needs to receive both messages? Let's say there is a back office application where both bookings and cancellations need to arrive. With direct exchanges, we would need to add two bindings, one for tour.booked and another for tour.cancelled. A better approach is to use the topic exchange. With topic exchanges, the email service can still bind using the routing key tour.booked, and will only receive those messages. But the back…
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.
Contents
-
-
-
-
(Locked)
Introducing the sample application2m 37s
-
(Locked)
Publish to a RabbitMQ exchange4m 21s
-
(Locked)
Consuming from a RabbitMQ exchange5m 54s
-
(Locked)
Filter messages with direct exchanges5m 40s
-
(Locked)
Filter messages with topic exchanges7m 31s
-
(Locked)
Filter messages with headers exchanges10m 11s
-
(Locked)
Challenge: A simple chat application1m 19s
-
(Locked)
Solution: A simple chat application6m 50s
-
(Locked)
Challenge: Chatrooms1m 25s
-
(Locked)
Solution: Chatrooms2m 42s
-
(Locked)
-
-