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:

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

org.springframework.pulsar:spring-pulsar

org.apache.pulsar:pulsar-spring

org.springframework.pulsar:spring-pulsar-bom

org.apache.pulsar:pulsar-spring-bom

org.springframework.pulsar:spring-pulsar-cache-provider

org.apache.pulsar:pulsar-spring-cache-provider

org.springframework.pulsar:spring-pulsar-cache-provider-caffeine

org.apache.pulsar:pulsar-spring-cache-provider-caffeine

org.springframework.pulsar:spring-pulsar-test

org.apache.pulsar:pulsar-spring-test

org.springframework.boot:spring-boot-pulsar

org.apache.pulsar:pulsar-spring-boot-autoconfigure

org.springframework.boot:spring-boot-starter-pulsar

org.apache.pulsar:pulsar-spring-boot-starter

org.springframework.boot:spring-boot-starter-pulsar-test

org.apache.pulsar:pulsar-spring-boot-starter-test

org.springframework.cloud:spring-cloud-stream-binder-pulsar

org.apache.pulsar:pulsar-spring-cloud-stream-binder

Package org.springframework.pulsar

Package org.apache.pulsar.spring

Package org.springframework.boot.pulsar

Package org.apache.pulsar.spring.boot

Package org.springframework.cloud.stream.binder.pulsar

Package org.apache.pulsar.spring.cloud.stream.binder

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.