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: Show chat users

Solution: Show chat users

(upbeat music) - [Instructor] To solve this challenge, let's first add some new users to RabbitMQ. In the management device, head over to Admin and create a new user. To keep things simple, I'll create one called user1 and use user1 as password as well. I'll also need to give the necessary permissions on the virtual host. Then I'll create a second user called user2 with user2 as password. And again, I'll need to give it permissions on the virtual host. Now you can add more users, but two will be enough for this. Back in our code, we can ask the user to specify the username. So before we start connecting, we'll do Console.WriteLine and say, please specify a username. We'll capture this username in the username variable. I'll also need a password. For simplicity's sake, I'll just copy it from the username. And then we need to change our connection string. So let me put username here and password here. Now where…

Contents