Member-only story
Apache Pulsar consumer and producer with Spring Boot
Welcome to another Spring Boot tutorial. In this story, we will learn how to get started with Apache Pulsar on the Spring Boot ecosystem.

Prerequisites
This is the list of all the prerequisites:
- Spring Boot 2.7.0
- Maven 3.6.3
- Java 17
- Apache Pulsar 2.10.0
- Docker installed
- Docker compose is installed
- Postman
Overview
What is Apache Pulsar?
Apache Pulsar is a cloud-native, multi-tenant, high-performance solution for server-to-server messaging and queuing built on the publisher-subscribe (pub-sub) pattern. Pulsar combines the best features of a traditional messaging system like RabbitMQ with those of a pub-sub system like Apache Kafka — scaling up or down dynamically without downtime. It’s used by thousands of companies for high-performance data pipelines, microservices, instant messaging, data integrations, and more.
Originally developed by Yahoo, Pulsar is under the stewardship of the Apache Software Foundation.
Architecture
A Pulsar instance is composed of one or more Pulsar clusters. This instance uses an instance-wide ZooKeeper cluster (configuration) for a store to retain information that pertains to multiple clusters, such as geo-replication
and tenant-level security policies.

Why use Apache Pulsar?
- It’s open source ecosystem
- It’s structured to scale elastically.
- It provides extensive documentation.
- Pulsar offers multi-tenancy, which allows multiple groups of users to share the cluster.
- It offers management tooling built-in.
- Pulsar combines modularity and performance with multi-tenancy, geo-replication, consolidating Queueing and Streaming capabilities into one…