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.

Challenge: Chatrooms

Challenge: Chatrooms - RabbitMQ Tutorial

From the course: Learning RabbitMQ

Start my 1-month free trial

Challenge: Chatrooms

(upbeat music) - 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 they'll be in the same room. Here's a diagram that clarifies this further. When the application starts, the user first enters a chat room 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 chat room name. A client that specified another chat room…

Contents