According to AMQP, when a consumer gets a message, it doesn't know the sender. Generally, consumers should not care about who produced the messages; that's good for the producer-consumer decoupling. However, sometimes it's necessary for authentication, and RabbitMQ provides the validated user-ID extension for this purpose.
In this example, we're simulating a book order using validated user-IDs. You can find the source code in
To use this recipe, we need to set up the Java development environment, as indicated in the Introduction section of Chapter 1, Working with AMQP.
Complete the following steps to simulate a book order using validated ...