Implementing the Order Management Messaging System with SpringJMS and ActiveMQ
In the preceding section about Apache ActiveMQ, we discussed the steps required to create a message queue and created an order queue. Now, let's send messages to the queue from the application.
The following table depicts the components of the application with JMS integrated with it.
The request flows from JSP to a Spring controller, which sets the order bean object and sends it orderSender
(which is a JMS message sender class). The class puts the order object in the queue.
The JMS Receiver is the class which reads from the queue. The read object is sent to the OrderRepository
class, which is a Mongo Repository class, and posts the messages to the MongoDB database.
The ...
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.