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.
Solution: Chatrooms - RabbitMQ Tutorial
From the course: Learning RabbitMQ
Solution: Chatrooms
(upbeat music) - [Instructor] To add chat rooms to our application, I'll first ask the user to specify the name of a chat room. So Console.WriteLine. Please specify a chat room. And then, our chatRoomName equals Console.ReadLine. Next, we'll change the Fanout exchange to a Direct exchange so that we can filter the messages. Because this exchange might still exist from our previous challenge, you can give the exchange a different name. Now, I'll just go with chat2. Now, the routing key is no longer irrelevant. On the contrary, the combination of the direct exchange and the routing key will allow us to receive only the messages from our chat room. So we'll need to change it where we bind the queue to our exchange. I'll just use the chatRoomName as the routing key, and then down here, where we publish the message, we also need to use the chatRoomName as the routing key. Now, let's run this. Again, Debug and Start Without…
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)
-
-