O'Reilly logo

Mastering Spring Application Development by Anjana Mankale

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required