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:
- Start the Apache ActiveMQ server, and in the console, click on Queues and create two queues.
- Let us create two queues and name the queues as follows:
PacktTestQueue1
PacktTestQueue2
- Create a new Spring project with the same dependency as the first example in the chapter.
- Create a
PacktMessageListener
class that implements theMessageListener
interface. The class overrides theonMessage(Message message)
method. - 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.