➤ How to Code a Game
➤ Array Programs in Java
➤ Java Inline Thread Creation
➤ Java Custom Exception
➤ Hibernate vs JDBC
➤ Object Relational Mapping
➤ Check Oracle DB Size
➤ Check Oracle DB Version
➤ Generation of Computers
➤ XML Pros & Cons
➤ Git Analytics & Its Uses
➤ Top Skills for Cloud Professional
➤ How to Hire Best Candidates
➤ Scrum Master Roles & Work
➤ CyberSecurity in Python
➤ Protect from Cyber-Attack
➤ Solve App Development Challenges
➤ Top Chrome Extensions for Twitch Users
➤ Mistakes That Can Ruin Your Test Metric Program
Message Queues Using Spring Boot | Message Queues:- Create a communication link between two applications for continuous data flow. For example, in any food delivery application, we can see the delivery person’s current location through continuous data flow.
- Send data from the Producer application to the consumer application (for a period of time, continuous data flow).
- Consumers need not make any request, just one time connect/subscribe.
This is not webservices concept, the consumer will never make any requests, even will not even send any data to the producer. Here, both Producer and Consumer applications communicate with each other using Mediator software called MOM (Message Oriented Middleware).
- This MOM S/w contains memory called as ‘Destination’ which holds all messages.
- The producer gives the message to MOM#Destination, consumer reads the message from MOM#Destination.
Types of Communications
- Peer-to-Peer Communication (P2P):- If one message is given to one consumer then it is called P2P. The destination type is called Queue. Example:- You ordered food via some App. That particular delivery person status will be visible only to you but not to every single user of that App.
- Publish and Subscribe Communication (Pub/Sub):- If the same/one message is given to multiple consumers then it is called Pub/Sub. The destination type is called Topic. Example:- You are watching a football match. The updates about the match will be visible to multiple clients.

More Examples:
- Food Delivery App Tracing Status: P2P
- Uber cabs (taxi) live status: P2P
- Train/Flight live status: Pub/Sub
- Football Matches Score: Pub/Sub
- Stock Market Details: Pub/Sub
- Whatsapp Group: Pub/Sub
- TV Channel: Pub/Sub
- There can be multiple queues/topics created in the MOM server.
- Every topic/queue is identified using one name. Example: uber-william-john-2012003-queue, crickdata-ind-aus-55682693-topic.
Destinations are of two types:-
- Queue: It is used in P2P communication.
- Topic: It is used in Pub/Sub communication.
Message Queues coding can be done by using:-
- JMS (Apache ActiveMQ) / RabbitMQ [These are Basic]
- Apache Kafka [In real-time, it is very commonly used]
If you enjoyed this post, share it with your friends. Do you want to share more information about the topic discussed above or do you find anything incorrect? Let us know in the comments. Thank you!