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

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