From the course: Learning RabbitMQ

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Validate user IDs

Validate user IDs

- [Instructor] When we receive a message from RabbitMQ, we don't know, by default, which user or application published this message. This is where validated user IDs come into play. When publishing a message through RabbitMQ, you can add a user ID. This is the username of your application you use to connect with RabbitMQ. If the user ID doesn't match the user name in the connecting string, the message will be refused. This means that RabbitMQ validates the user ID in the message. That way, the consumer can be sure that the message originated from a specific user. To see this in action, let's open the web application. In the Exercise Files, in the chapter three folder, and then in the 03_03 Begin folder, you will come find the WebApp. Go ahead and open the solution. In Solution Explorer, expand the Controllers folder, and open the BookingController. At the bottom of this file, in the SendMessage method, we…

Contents