From the course: Learning RabbitMQ: Efficient Message Queuing
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Challenge: Chatrooms - RabbitMQ Tutorial
From the course: Learning RabbitMQ: Efficient Message Queuing
Challenge: Chatrooms
(soothing music) - [Instructor] Now that we have a simple chat application that communicates over RabbitMQ, let's step up our game and add chat rooms. This means we will no longer use a fanout exchange and send our messages to all clients. Instead, we'll route the messages to the queues of the clients that have joined the same chat room. You don't need to implement a complex mechanism to let the user choose a chat room. In its simplest form, you can just let them enter some free text for a chat room name. If two users enter the same text, then there'll be in the same room. Here's a diagram that clarifies this further. When the application starts, the user first enters a chatroom name. This can be any string. Then when the user enters a message, we send a message to RabbitMQ. In RabbitMQ, we must ensure that the message is routed to any other clients that have entered the same chatroom name. A client that specified…
Contents
-
-
-
-
Introducing the sample application2m 22s
-
(Locked)
Publish to a RabbitMQ exchange4m 39s
-
(Locked)
Consuming from a RabbitMQ exchange4m 5s
-
(Locked)
Filter messages with direct exchanges5m 8s
-
(Locked)
Filter messages with topic exchanges5m 55s
-
(Locked)
Filter messages with headers exchanges6m 45s
-
(Locked)
Challenge: A simple chat application1m 10s
-
(Locked)
Solution: A simple chat application5m 20s
-
(Locked)
Challenge: Chatrooms1m 13s
-
(Locked)
Solution: Chatrooms2m 17s
-
-
-