Everything about Distributed Message Queue

Love Sharma
ByteByteGo System Design Alliance
8 min readFeb 19, 2022

--

With the growing adoption of Distributed System movement across Industry, Message Queue is now becoming part of this significant movement. Data flow from end-users to applications is growing tremendously. With this, we also need to understand the nature of these requests, i.e., whether the request must be synchronously or can it be taken offline and executed offline? If asynchronous, we need a message queue to accommodate multiple such asynchronous nature requests.

What is Message Queue

A message queue is a messaging destination that uses the queue data structure to facilitate asynchronous communication between two services, commonly used in serverless and microservices architectures. Messages are stored on the queue until they are processed and deleted. Each message is processed only once by a single consumer. And MQ helps to decouple heavyweight processing, buffer or batch work, and smooth spiky workloads.

The message queue is comprised of two terms:

  1. Message: this is the object passed from the producer to the Consumer. The object can be requests, information, meta-data, etc.
  2. Queue: this is a temporary buffer that stores messages. It uses the First-In-First-Out method to pass the messages from producer to Consumer.
Basic Message Queue

--

--

Love Sharma
ByteByteGo System Design Alliance

Love is an experience cloud engineer with a demonstrated history of building large scale enterprise application.