Stacking and consuming tasks with RabbitMQ and AMQP
This recipe will demonstrate how to implement a Message-oriented-Middleware (MoM). This is a very popular technique in scalability based on asynchronous communication between components.
Getting ready
We have already introduced the new cloudstreetmarket-shared
and cloudstreetmarket-websocket
Java projects. WebSockets are now split away from cloudstreetmarket-api
, but cloudstreetmarket-websocket
and cloudstreetmarket-api
will still communicate with each other using messaging.
In order to decouple secondary tasks from the request thread (secondary tasks like event producing), you need to learn how to configure and use AMQP message templates and listeners with RabbitMQ.
How to do it…
- Access the RabbitMQ ...
Get Spring MVC: Designing Real-World Web Applications 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.