Big Data 10 min read

Comparing Apache Pulsar and Kafka: Messaging Models, Subscriptions, Acknowledgment, and Retention

This article compares Apache Pulsar and Kafka, explaining their messaging models, queue versus stream use cases, subscription types, acknowledgment mechanisms, and message retention/TTL features to help readers choose a high‑performance, highly available streaming platform.

Big Data Technology & Architecture
Big Data Technology & Architecture
Big Data Technology & Architecture
Comparing Apache Pulsar and Kafka: Messaging Models, Subscriptions, Acknowledgment, and Retention

In this article, the author compares Apache Pulsar and Apache Kafka, focusing on key aspects that influence the choice of a high‑performance, highly available streaming messaging platform.

Messaging model : The article outlines three essential dimensions—message consumption, message acknowledgment, and message retention—that users should evaluate when selecting a streaming system.

It distinguishes between queue‑style (unordered, shared) and stream‑style (ordered, exclusive) use cases, explaining how queues suit stateless applications while streams suit stateful applications.

Pulsar model : Pulsar unifies queue and stream semantics through a producer‑topic‑subscription‑consumer model, with topics backed by Apache BookKeeper logs and flexible subscription types (exclusive, failover, shared) that can be mixed on the same topic.

Exclusive (stream) subscriptions allow only one consumer per partition; failover subscriptions provide a primary consumer with standby consumers; shared (queue) subscriptions distribute messages among multiple consumers, enabling horizontal scaling without increasing partitions.

Message acknowledgment : Pulsar uses cursors to track acknowledgments, supporting both individual ack and cumulative ack, offering finer‑grained control compared with Kafka’s offset‑based commits.

Message retention and TTL : Unlike traditional systems, Pulsar retains messages after acknowledgment until all subscriptions have consumed them, and also supports a time‑to‑live (TTL) that automatically marks unused messages as acknowledged after a configured period.

The article includes diagrams illustrating subscription types, acknowledgment modes, and retention behavior, and concludes that Pulsar combines the high‑throughput streaming of Kafka with the flexible queuing of systems like RabbitMQ.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

StreamingKafkasubscriptionApache PulsarMessage AcknowledgmentretentionMessaging Model
Big Data Technology & Architecture
Written by

Big Data Technology & Architecture

Wang Zhiwu, a big data expert, dedicated to sharing big data technology.

0 followers
Reader feedback

How this landed with the community

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.