Working with multiple queues in ApacheMQ

In the preceding section, we demonstrated sending messages using Map Message to Order Queue. Now, we can have a look at how to work with multiple queues in ApacheMQ:

  1. Start the Apache ActiveMQ server, and in the console, click on Queues and create two queues.
  2. Let us create two queues and name the queues as follows:
    • PacktTestQueue1
    • PacktTestQueue2
    Working with multiple queues in ApacheMQ
  3. Create a new Spring project with the same dependency as the first example in the chapter.
  4. Create a PacktMessageListener class that implements the MessageListener interface. The class overrides the onMessage(Message message) method.
  5. Spring's DefaultMessageListener consumes ...

Get Mastering Spring Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.