Migration from Spring’s Pulsar support
Apache Pulsar support for Spring is the successor to Spring for Apache Pulsar. This page describes where the project came from and what you need to change when you move an application to it.
1. Background
Further development happens under the Apache Pulsar project in the apache/pulsar-spring repository.
The project brings together code that was previously maintained in three repositories:
-
spring-projects/spring-pulsar: the core library, cache providers and test utilities
-
spring-projects/spring-boot: the Spring Boot auto-configuration and starters
-
spring-cloud/spring-cloud-stream: the Spring Cloud Stream binder
The version has been bumped to 3.0.0-M1 to indicate that this project is the successor to Spring for Apache Pulsar 2.0.x.
2. Updating your application
The Maven coordinates and Java packages have changed:
| Previous | New |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Package |
Package |
Package |
Package |
Package |
Package |
Replace the previous dependencies rather than adding the new ones next to them, so that the previous auto-configuration and binder are not also on the classpath.
Spring Boot does not manage the version of these artifacts, so you need to declare it, either on each dependency or by importing pulsar-spring-bom.
See Override Spring Boot Dependencies for how to set the Pulsar client version.
The spring.pulsar.* and spring.cloud.stream.pulsar.* configuration properties have not changed.