Navigating the World of Messaging Queues

Jahid Momin
3 min readMar 24, 2024

--

created by canva

Before diving into it , why Messaging Queues ?

In today’s fast-paced digital world, we’re surrounded by a flood of data every day. Just think about apps like Swiggy or Zomato or Many Apps — they’re constantly updating you on the location of your delivery driver, right? Imagine if every time your driver moved, your app had to wait for that information. It would slow things down, right? That’s where messaging queues come in. They’re like super-fast, organized post offices for data. They make sure that as soon as your driver’s location changes, that info gets sent to your app lightning-fast, without any delays. Plus, they can handle tons of data at once, so even if thousands of people are tracking their deliveries at the same time, everything keeps flowing smoothly. So, messaging queues matter because they keep our apps running fast, no matter how much data we’re dealing with, and they make sure you get your food hot and fresh!

What are Messaging Queues?

Messaging queues act as digital post offices, managing the flow of messages (you can call events as well ) between sources (producers) and destinations (consumers). They enable asynchronous communication, allowing components to interact without being tightly coupled.

Heart Of Messaging Queues

The Concept of Message-Oriented Middleware (MOM)

At the heart of messaging queues lies the concept of Message-Oriented Middleware (MOM), which serves as the intermediary (Mediator) between producers and consumers. MOM ensures reliable message delivery, even in the face of network failures or system downtimes, by temporarily storing messages ( It uses some kind of db like leveldb and koha etc) and facilitating their exchange.

Where are Messaging Queues Used?

Real-Time Use Cases

  • Order Processing: E-commerce platforms efficiently manage order processing, ensuring timely updates for customers.
  • Notifications: Instant messaging apps deliver real-time notifications to multiple devices using messaging queues.
  • Data Streaming: Streaming platforms process and distribute large volumes of real-time data, such as social media feeds or financial market updates like stocks , bitcoins :) .

Types Messaging Protocols BMQP vs. AMQP

Basic Messaging Queue Protocol — Language Dependent — JMS , simplicity and speed but may have lack some advanced features .

Advanced Messaging Queue Protocol — Language Independent — Kafka ,RabbitMQ , comprehensive set of features such as message queuing, routing, and reliability mechanisms, making them suitable for building complex distributed systems

Messaging can occur in two ways:

  1. Point-to-Point (P2P): A single producer communicates with a single consumer. Example: OTP Service From Service to single User.
  2. Publish-Subscribe (Pub-Sub): One producer communicates with multiple consumers. Example: Notifications in instant messaging apps like whatsapp groups .

Thanks for reading i'll write an next article to implement BMQP with JMS & Springboot. Stay tune , happy learning :)

[ MOM, BMQP, AMQP, P2P , PUB-SUB , MQs ]

--

--

Jahid Momin
Jahid Momin

Written by Jahid Momin

Team Lead | Sr Software Engineer | Spring boot | Microservices | JavaScript | CodeIgniter | HTML | CSS | ReactJS | NextJS | Youtuber | Writer

No responses yet