CoderSathi
  • Tutorial
    • Java Tutorial
    • Swing Tutorial
    • JDBC Tutorial
    • Java String Tutorial
    • Servlet and JSP Tutorial
  • Mongo DB
  • AWS
  • DevOps
  • Linux
  • Git
Home > System Design > What is Message Queue?

What is Message Queue?

Learn the concepts, implementation details, and practical steps with a clean developer-focused walkthrough.

Yuba Raj Kalathoki
By Yuba Raj Kalathoki
Last updated: July 1, 2026 · 2 min read · 0 Comments
Share: in X
Message Queue

A message queue is a software intermediary that decouples the sender of a message from the receiver.

A message queue is a temporary storage area for messages. Messages are stored in the queue until they are processed by a consumer. This allows the sender and receiver of a message to operate independently. The sender does not need to wait for the receiver to be available to process the message. The receiver can process the message when it is ready.

Message queues are often used in distributed systems to communicate between different components. They can also be used to decouple heavyweight processing, to buffer or batch work, and to smooth spiky workloads.

Advantages of using message queue

  1. Decoupling: Message queues decouple the sender and receiver of a message. This allows the sender and receiver to operate independently, which can improve scalability and reliability.
  2. Scalability: Message queues can be scaled horizontally to handle a large number of messages. This makes them a good choice for distributed systems.
  3. Reliability: Message queues can help to improve the reliability of systems by buffering messages. If a receiver fails, the messages can be stored in the queue and processed later.
  4. Performance: Message queues can improve the performance of systems by batching messages. This can reduce the number of network calls and database queries that need to be made.

Disadvantages of using message queue

  1. Latency: Message queues can add latency to the communication between the sender and receiver. This is because the message needs to be stored in the queue and then processed by the receiver.
  2. Complexity: Message queues can add complexity to systems. This is because they introduce a new layer of abstraction between the sender and receiver.
  3. Security: Message queues can introduce security risks. This is because messages are stored in a central location, which could be a target for attackers.

Examples of message queue

  • Amazon Simple Queue Service (SQS): SQS is a fully managed message queuing service that makes it easy to decouple and scale microservices, distributed systems, and serverless applications.
  • RabbitMQ: RabbitMQ is an open source message broker that implements the Advanced Message Queuing Protocol (AMQP).
  • Apache Kafka: Apache Kafka is a distributed streaming platform that can be used as a message queue or a data store.
  • ActiveMQ: ActiveMQ is an open source message broker that implements the Java Message Service (JMS) specification.

Related Posts:

  • Distributed Systems
  • Inner Thread Communication in Java
  • Consistency and Availability in Distributed System
  • Send Email Using Java
  • Software Engineering Introduction
  • Monolithic and Microservices Architecture
Tags:Message Queuesystem-design
Was this article helpful?
← Previous ArticleDropWhile() and takeWhile() Methods in Java Stream API
Next Article →Consistency and Availability in Distributed System

Recent Posts

  • How to implement Passwordless Authentication in Spring Boot: A Step-by-Step Guide
  • How to Use AWS CloudFront Signed URLs in Spring Boot?
  • How to Fix SSH Agent Forwarding on macOS: The Ultimate Guide for Developers
  • How to Read AWS Secrets Manager in Spring Boot (Step-by-Step)
  • How to Fix “Public Key Retrieval is not allowed” MySQL JDBC Error
CoderSathi

Your go-to resource for Java, Spring Boot, Microservices, AWS, and modern development tutorials.

Linkedin

Quick Links

  • About
  • Contact

Popular Topics

  • Java
  • Spring Boot
  • AWS
  • DevOps
  • MongoDB
  • Linux
  • Git
  • How to
© 2026 CoderSathi. All rights reserved. Privacy Policy · Sitemap