Backend Development 7 min read

Common Message Middleware Overview: Kafka, RabbitMQ, ActiveMQ, RocketMQ, and Pulsar

This article introduces five widely used message middleware systems—Kafka, RabbitMQ, ActiveMQ, RocketMQ, and Pulsar—explaining their core architectures, key components, typical use cases, and advantages for building reliable, high‑throughput backend solutions.

Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Common Message Middleware Overview: Kafka, RabbitMQ, ActiveMQ, RocketMQ, and Pulsar

Hello, I am mikechen. Java interview questions often ask about message middleware, so I will give a detailed introduction to the most common ones.

1. Apache Kafka

Kafka is a distributed, high‑throughput messaging system originally developed by LinkedIn and now an Apache top‑level open‑source project.

It is widely used for real‑time stream processing, log aggregation, monitoring, metrics collection, and message queuing.

The core architecture includes topics, producers, consumers, partitions, and offsets, with brokers handling storage and transmission.

Topic: logical grouping of messages.

Producer: sends messages to a specific topic/partition.

Consumer: reads messages from one or more topics.

Partition: ordered log segment that can be processed in parallel across nodes.

Offset: position marker that tracks what each consumer has processed.

2. RabbitMQ

RabbitMQ is an open‑source, cross‑platform message broker that implements the AMQP protocol and is written in Erlang.

Its architecture consists of queues, exchanges, bindings, producers, and consumers, supporting task distribution, asynchronous communication, and event‑driven scenarios.

Queue: storage area for messages.

Exchange: routes messages to queues based on routing keys.

Binding: defines routing rules between exchanges and queues.

Producer: publishes messages to an exchange.

Consumer: retrieves messages from a queue.

3. ActiveMQ

ActiveMQ is a popular open‑source message broker that supports JMS and STOMP protocols, suitable for asynchronous communication, decoupling, and buffering.

It follows the JMS specification and is considered a first‑generation message middleware.

4. RocketMQ

RocketMQ is a distributed message queue system developed and open‑sourced by Alibaba.

Its advantages include high throughput and low latency (Zero‑Copy and batch transmission), distributed architecture for high availability, message ordering guarantees, and reliability mechanisms such as synchronous disk flush and master‑slave replication.

The architecture comprises Nameserver (service discovery), Broker (storage and forwarding), Producer, Consumer, and a storage layer that writes to memory and asynchronously flushes to disk.

5. Pulsar

Pulsar is an Apache top‑level project and a next‑generation cloud‑native distributed streaming platform.

It offers a layered architecture with a Broker layer for message delivery and a BookKeeper layer for durable storage, supports multi‑tenant isolation, high reliability, horizontal scalability, and multiple protocols.

The design goals are high availability, scalability, maintainability, high throughput, and low latency.

---

Finally, a free resource is offered: a comprehensive "Java Interview Questions and Answers" document covering Java, multithreading, JVM, Spring, MySQL, Redis, Dubbo, and middleware. Click the image below to view the detailed questions, and add the author on WeChat (remark "Answer") to receive the answer set.

Click the above image to see the detailed interview questions.

backendmiddlewareKafkaMessage QueueRabbitMQrocketmqPulsarActiveMQ
Mike Chen's Internet Architecture
Written by

Mike Chen's Internet Architecture

Over ten years of BAT architecture experience, shared generously!

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.