Overview
Apache Pulsar support for Spring makes it easier to build Apache Pulsar applications with Spring. It brings familiar Spring concepts to Pulsar, such as templates, annotated listener methods and auto-configuration, so that your application can focus on its messages rather than on managing clients, producers and consumers.
This documentation is for version 3.0.0-M1.
Most applications use Spring Boot with the pulsar-spring-boot-starter dependency.
The Quick Tour shows what to add to a Maven or Gradle build, and a complete application.
The Introduction describes the other steps to get started.
If you are moving an application from Spring for Apache Pulsar, which this project is derived from, see Migration from Spring’s Pulsar support.
1. What it provides
-
Publishing messages:
PulsarTemplatepublishes messages to a topic. -
Consuming messages:
@PulsarListenerand@PulsarReaderturn a method into a consumer or a reader of a topic. -
Spring Boot: the
pulsar-spring-boot-starterstarter auto-configures these components from configuration properties. -
Spring Cloud Stream: a binder connects event-driven applications to Pulsar.
-
Pulsar features: support for transactions, administration and Pulsar Functions.
-
Production and testing: observability with Micrometer, and utilities for tests.
2. Modules
All artifacts use the org.apache.pulsar group ID.
| Artifact | Description |
|---|---|
|
Core library |
|
Spring Boot auto-configuration |
|
Starter for Spring Boot applications |
|
Starter for testing Spring Boot applications |
|
Spring Cloud Stream binder |
|
Test utilities |
|
Bill of materials |
3. Origin
Apache Pulsar support for Spring is derived from Spring for Apache Pulsar, also known as Spring Pulsar (github.com/spring-projects/spring-pulsar), from the Apache Pulsar starter and auto-configuration in Spring Boot (github.com/spring-projects/spring-boot), and from the Apache Pulsar binder in Spring Cloud Stream (github.com/spring-cloud/spring-cloud-stream), all licensed under the Apache License, Version 2.0. Those works remain the copyright of their original authors and contributors, as stated in the headers of the source files.