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.
Solution: Chatrooms - RabbitMQ Tutorial
From the course: Learning RabbitMQ: Efficient Message Queuing
Solution: Chatrooms
(upbeat music) - [Instructor] So here's how I added chat rooms to our application. First, we need the chat room name. So Console.WriteLine("Please specify a chat room"); and we'll capture the input from the user in the chatRoomName variable. There. We want to change the exchange type to a direct exchange so we can start filtering and there might still be an exchange from the previous challenge, so I'll call my exchange name now "chat2"; The routing key is no longer irrelevant now. 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 where we bind our queue to the exchange, we'll pass in the chat room name as routing key and where we publish the message, we also need to pass in the chat room name for the routing key. Now let's run this application. So dotnet run --project RabbitChat. In the other terminal I'll do the same.…
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
-
-
-