Skip to content

Commit 4aaa1df

Browse files
onobcsnicoll
authored andcommitted
Remove Spring Pulsar Reactive support
This removes the auto-configuration for Spring Pulsar Reactive. Consolidates the PulsarConfiguration into the PulsarAutoConfiguration because there is no longer a need to factor out the common components between Spring Pulsar and Spring Pulsar Reactive. See gh-47707 Signed-off-by: onobc <[email protected]>
1 parent 11f1c6c commit 4aaa1df

File tree

30 files changed

+161
-1737
lines changed

30 files changed

+161
-1737
lines changed

buildSrc/src/main/java/org/springframework/boot/build/antora/AntoraAsciidocAttributes.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ private void addVersionAttributes(Map<String, String> attributes, Map<String, St
178178
addSpringDataDependencyVersion(attributes, internal, "spring-data-redis");
179179
addSpringDataDependencyVersion(attributes, internal, "spring-data-rest", "spring-data-rest-core");
180180
addSpringDataDependencyVersion(attributes, internal, "spring-data-ldap");
181-
addDependencyVersion(attributes, "pulsar-client-reactive-api", "org.apache.pulsar:pulsar-client-reactive-api");
182181
addDependencyVersion(attributes, "pulsar-client-api", "org.apache.pulsar:pulsar-client-api");
183182
}
184183

buildSrc/src/main/resources/org/springframework/boot/build/antora/antora-asciidoc-attributes.properties

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ url-native-build-tools-docs-maven-plugin={url-native-build-tools-docs}/maven-plu
3636
url-paketo-docs=https://paketo.io/docs
3737
url-paketo-docs-java-buildpack={url-paketo-docs}/buildpacks/language-family-buildpacks/java
3838
url-pulsar-client-api-javadoc=https://javadoc.io/doc/org.apache.pulsar/pulsar-client-api/{version-pulsar-client-api}
39-
url-pulsar-client-reactive-api-javadoc=https://javadoc.io/doc/org.apache.pulsar/pulsar-client-reactive-api/{version-pulsar-client-reactive-api}
4039
url-spring-boot-for-apache-geode-docs=https://docs.spring.io/spring-boot-data-geode-build/2.0.x/reference/html5
4140
url-spring-boot-for-apache-geode-site=https://github.com/spring-projects/spring-boot-data-geode
4241
url-spring-data-cassandra-docs=https://docs.spring.io/spring-data/cassandra/reference/{antoraversion-spring-data-cassandra}
@@ -87,7 +86,6 @@ url-jackson2-databind-javadoc=https://javadoc.io/doc/com.fasterxml.jackson.core/
8786
javadoc-location-com-fasterxml-jackson-annotation={url-jackson-annotations-javadoc}
8887
javadoc-location-com-fasterxml-jackson-databind={url-jackson2-databind-javadoc}
8988
javadoc-location-org-apache-pulsar-client-api={url-pulsar-client-api-javadoc}
90-
javadoc-location-org-apache-pulsar-reactive-client-api={url-pulsar-client-reactive-api-javadoc}
9189
javadoc-location-org-springframework-data-cassandra={url-spring-data-cassandra-javadoc}
9290
javadoc-location-org-springframework-data-convert={url-spring-data-commons-javadoc}
9391
javadoc-location-org-springframework-data-querydsl={url-spring-data-commons-javadoc}
@@ -132,4 +130,3 @@ code-spring-boot-latest=https://github.com/{github-repo}/tree/main
132130
code-spring-boot-servlet-src={code-spring-boot}/module/spring-boot-servlet/src/main/java/org/springframework/boot/servlet
133131
code-spring-boot-thymeleaf-src={code-spring-boot}/module/spring-boot-thymeleaf/src/main/java/org/springframework/boot/thymeleaf
134132
code-spring-boot-webmvc-src={code-spring-boot}/module/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc
135-

buildSrc/src/test/java/org/springframework/boot/build/antora/AntoraAsciidocAttributesTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ private Map<String, String> mockDependencyVersions(String version) {
287287
addMockJacksonCoreVersion(versions, "jackson-databind", version);
288288
addMockJacksonCoreVersion(versions, "jackson-databind", version);
289289
versions.put("org.apache.pulsar:pulsar-client-api", version);
290-
versions.put("org.apache.pulsar:pulsar-client-reactive-api", version);
291290
versions.put("tools.jackson.dataformat:jackson-dataformat-xml", version);
292291
return versions;
293292
}

documentation/spring-boot-docs/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ dependencies {
204204
implementation("org.springframework.kafka:spring-kafka")
205205
implementation("org.springframework.kafka:spring-kafka-test")
206206
implementation("org.springframework.pulsar:spring-pulsar")
207-
implementation("org.springframework.pulsar:spring-pulsar-reactive")
208207
implementation("org.springframework.restdocs:spring-restdocs-mockmvc")
209208
implementation("org.springframework.restdocs:spring-restdocs-webtestclient")
210209
implementation("org.springframework.security:spring-security-config")

documentation/spring-boot-docs/src/docs/antora/modules/ROOT/pages/redirect.adoc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,15 +1781,11 @@
17811781
* xref:reference:messaging/pulsar.adoc#messaging.pulsar.additional-properties[#messaging.pulsar.additional-properties]
17821782
* xref:reference:messaging/pulsar.adoc#messaging.pulsar.admin.auth[#messaging.pulsar.admin.auth]
17831783
* xref:reference:messaging/pulsar.adoc#messaging.pulsar.admin[#messaging.pulsar.admin]
1784-
* xref:reference:messaging/pulsar.adoc#messaging.pulsar.connecting-reactive[#messaging.pulsar.connecting-reactive]
17851784
* xref:reference:messaging/pulsar.adoc#messaging.pulsar.connecting.auth[#messaging.pulsar.connecting.auth]
17861785
* xref:reference:messaging/pulsar.adoc#messaging.pulsar.connecting.ssl[#messaging.pulsar.connecting.ssl]
17871786
* xref:reference:messaging/pulsar.adoc#messaging.pulsar.connecting[#messaging.pulsar.connecting]
1788-
* xref:reference:messaging/pulsar.adoc#messaging.pulsar.reading-reactive[#messaging.pulsar.reading-reactive]
17891787
* xref:reference:messaging/pulsar.adoc#messaging.pulsar.reading[#messaging.pulsar.reading]
1790-
* xref:reference:messaging/pulsar.adoc#messaging.pulsar.receiving-reactive[#messaging.pulsar.receiving-reactive]
17911788
* xref:reference:messaging/pulsar.adoc#messaging.pulsar.receiving[#messaging.pulsar.receiving]
1792-
* xref:reference:messaging/pulsar.adoc#messaging.pulsar.sending-reactive[#messaging.pulsar.sending-reactive]
17931789
* xref:reference:messaging/pulsar.adoc#messaging.pulsar.sending[#messaging.pulsar.sending]
17941790
* xref:reference:messaging/pulsar.adoc#messaging.pulsar[#messaging.pulsar]
17951791
* xref:reference:messaging/rsocket.adoc#messaging.rsocket.messaging[#boot-features-rsocket-messaging]

documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/messaging/pulsar.adoc

Lines changed: 2 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33

44
https://pulsar.apache.org/[Apache Pulsar] is supported by providing auto-configuration of the {url-spring-pulsar-site}[Spring for Apache Pulsar] project.
55

6-
Spring Boot will auto-configure and register the classic (imperative) Spring for Apache Pulsar components when `org.springframework.pulsar:spring-pulsar` is on the classpath.
7-
It will do the same for the reactive components when `org.springframework.pulsar:spring-pulsar-reactive` is on the classpath.
8-
9-
There are `spring-boot-starter-pulsar` and `spring-boot-starter-pulsar-reactive` starters for conveniently collecting the dependencies for imperative and reactive use, respectively.
6+
Spring Boot will auto-configure and register the Spring for Apache Pulsar components when `org.springframework.pulsar:spring-pulsar` is on the classpath.
107

8+
There is the `spring-boot-starter-pulsar` starter for conveniently collecting the dependencies for use.
119

1210

1311
[[messaging.pulsar.connecting]]
@@ -68,15 +66,6 @@ You can follow {url-spring-pulsar-docs}/reference/pulsar/pulsar-client.html#tls-
6866

6967
For complete details on the client and authentication see the Spring for Apache Pulsar {url-spring-pulsar-docs}/reference/pulsar/pulsar-client.html[reference documentation].
7068

71-
[[messaging.pulsar.connecting-reactive]]
72-
== Connecting to Pulsar Reactively
73-
74-
When the Reactive auto-configuration is activated, Spring Boot will auto-configure and register a javadoc:org.apache.pulsar.reactive.client.api.ReactivePulsarClient[] bean.
75-
76-
The javadoc:org.apache.pulsar.reactive.client.api.ReactivePulsarClient[] adapts an instance of the previously described javadoc:org.apache.pulsar.client.api.PulsarClient[].
77-
Therefore, follow the previous section to configure the javadoc:org.apache.pulsar.client.api.PulsarClient[] used by the javadoc:org.apache.pulsar.reactive.client.api.ReactivePulsarClient[].
78-
79-
8069

8170
[[messaging.pulsar.admin]]
8271
== Connecting to Pulsar Administration
@@ -118,27 +107,6 @@ You can also pass in a javadoc:org.springframework.pulsar.core.ProducerBuilderCu
118107

119108
If you need more control over the message being sent, you can pass in a javadoc:org.springframework.pulsar.core.TypedMessageBuilderCustomizer[] when sending a message.
120109

121-
122-
123-
[[messaging.pulsar.sending-reactive]]
124-
== Sending a Message Reactively
125-
126-
When the Reactive auto-configuration is activated, Spring's javadoc:org.springframework.pulsar.reactive.core.ReactivePulsarTemplate[] is auto-configured, and you can use it to send messages, as shown in the following example:
127-
128-
include-code::MyBean[]
129-
130-
The javadoc:org.springframework.pulsar.reactive.core.ReactivePulsarTemplate[] relies on a javadoc:org.springframework.pulsar.reactive.core.ReactivePulsarSenderFactory[] to actually create the underlying sender.
131-
Spring Boot auto-configuration also provides this sender factory, which by default, caches the producers that it creates.
132-
You can configure the sender factory and cache settings by specifying any of the `spring.pulsar.producer.\*` and `spring.pulsar.producer.cache.*` prefixed application properties.
133-
134-
If you need more control over the sender factory configuration, consider registering one or more javadoc:org.springframework.pulsar.reactive.core.ReactiveMessageSenderBuilderCustomizer[] beans.
135-
These customizers are applied to all created senders.
136-
You can also pass in a javadoc:org.springframework.pulsar.reactive.core.ReactiveMessageSenderBuilderCustomizer[] when sending a message to only affect the current sender.
137-
138-
If you need more control over the message being sent, you can pass in a javadoc:org.springframework.pulsar.reactive.core.MessageSpecBuilderCustomizer[] when sending a message.
139-
140-
141-
142110
[[messaging.pulsar.receiving]]
143111
== Receiving a Message
144112

@@ -156,23 +124,6 @@ You can also customize a single listener by setting the `consumerCustomizer` att
156124

157125
If you need more control over the actual container factory configuration, consider registering one or more `PulsarContainerFactoryCustomizer<ConcurrentPulsarListenerContainerFactory<?>>` beans.
158126

159-
[[messaging.pulsar.receiving-reactive]]
160-
== Receiving a Message Reactively
161-
162-
When the Apache Pulsar infrastructure is present and the Reactive auto-configuration is activated, any bean can be annotated with javadoc:org.springframework.pulsar.reactive.config.annotation.ReactivePulsarListener[format=annotation] to create a reactive listener endpoint.
163-
The following component creates a reactive listener endpoint on the `someTopic` topic:
164-
165-
include-code::MyBean[]
166-
167-
Spring Boot auto-configuration provides all the components necessary for javadoc:org.springframework.pulsar.reactive.config.annotation.ReactivePulsarListener[], such as the javadoc:org.springframework.pulsar.reactive.config.ReactivePulsarListenerContainerFactory[] and the consumer factory it uses to construct the underlying reactive Pulsar consumers.
168-
You can configure these components by specifying any of the `spring.pulsar.listener.\*` and `spring.pulsar.consumer.*` prefixed application properties.
169-
170-
If you need more control over the configuration of the consumer factory, consider registering one or more javadoc:org.springframework.pulsar.reactive.core.ReactiveMessageConsumerBuilderCustomizer[] beans.
171-
These customizers are applied to all consumers created by the factory, and therefore all javadoc:org.springframework.pulsar.reactive.config.annotation.ReactivePulsarListener[format=annotation] instances.
172-
You can also customize a single listener by setting the `consumerCustomizer` attribute of the javadoc:org.springframework.pulsar.reactive.config.annotation.ReactivePulsarListener[format=annotation] annotation.
173-
174-
If you need more control over the actual container factory configuration, consider registering one or more `PulsarContainerFactoryCustomizer<DefaultReactivePulsarListenerContainerFactory<?>>` beans.
175-
176127
[[messaging.pulsar.reading]]
177128
== Reading a Message
178129

@@ -194,22 +145,6 @@ You can also customize a single listener by setting the `readerCustomizer` attri
194145
If you need more control over the actual container factory configuration, consider registering one or more `PulsarContainerFactoryCustomizer<DefaultPulsarReaderContainerFactory<?>>` beans.
195146

196147

197-
[[messaging.pulsar.reading-reactive]]
198-
== Reading a Message Reactively
199-
200-
When the Apache Pulsar infrastructure is present and the Reactive auto-configuration is activated, Spring's javadoc:org.springframework.pulsar.reactive.core.ReactivePulsarReaderFactory[] is provided, and you can use it to create a reader in order to read messages in a reactive fashion.
201-
The following component creates a reader using the provided factory and reads a single message from 5 minutes ago from the `someTopic` topic:
202-
203-
include-code::MyBean[]
204-
205-
Spring Boot auto-configuration provides this reader factory which can be customized by setting any of the `spring.pulsar.reader.*` prefixed application properties.
206-
207-
If you need more control over the reader factory configuration, consider passing in one or more javadoc:org.springframework.pulsar.reactive.core.ReactiveMessageReaderBuilderCustomizer[] instances when using the factory to create a reader.
208-
209-
If you need more control over the reader factory configuration, consider registering one or more javadoc:org.springframework.pulsar.reactive.core.ReactiveMessageReaderBuilderCustomizer[] beans.
210-
These customizers are applied to all created readers.
211-
You can also pass one or more javadoc:org.springframework.pulsar.reactive.core.ReactiveMessageReaderBuilderCustomizer[] when creating a reader to only apply the customizations to the created reader.
212-
213148
TIP: For more details on any of the above components and to discover other available features, see the Spring for Apache Pulsar {url-spring-pulsar-docs}[reference documentation].
214149

215150

@@ -219,8 +154,6 @@ TIP: For more details on any of the above components and to discover other avail
219154

220155
Spring for Apache Pulsar supports transactions when using javadoc:org.springframework.pulsar.core.PulsarTemplate[] and javadoc:org.springframework.pulsar.annotation.PulsarListener[format=annotation].
221156

222-
NOTE: Transactions are not currently supported when using the reactive variants.
223-
224157
Setting the configprop:spring.pulsar.transaction.enabled[] property to `true` will:
225158

226159
* Configure a javadoc:org.springframework.pulsar.transaction.PulsarTransactionManager[] bean

documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/messaging/pulsar/readingreactive/MyBean.java

Lines changed: 0 additions & 51 deletions
This file was deleted.

documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/messaging/pulsar/receivingreactive/MyBean.java

Lines changed: 0 additions & 33 deletions
This file was deleted.

documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/messaging/pulsar/sendingreactive/MyBean.java

Lines changed: 0 additions & 35 deletions
This file was deleted.

documentation/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/messaging/pulsar/readingreactive/MyBean.kt

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)