diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 776a99fd..b845f2ff 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -9,7 +9,7 @@ micrometer = "1.13.2" micrometer-docs-gen = "1.0.3" micrometer-tracing = "1.3.2" protobuf = "3.25.4" -pulsar = "3.3.0" +pulsar = "3.3.1" pulsar-reactive = "0.5.6" reactor = "2023.0.8" spring = "6.1.11" diff --git a/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/whats-new.adoc b/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/whats-new.adoc index 40774f7c..2c054a8d 100644 --- a/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/whats-new.adoc +++ b/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/whats-new.adoc @@ -10,6 +10,11 @@ This section covers the changes made from version 1.1 to version 1.2. You can provide your own Jackson `ObjectMapper` that Pulsar will use when producing and consuming JSON messages. See xref:./reference/custom-object-mapper.adoc[Custom Object Mapper] for more details. +=== Deprecations + +==== PulsarClient#getPartitionsForTopic(java.lang.String) +Version `3.3.1` of the Pulsar client deprecates the `getPartitionsForTopic(java.lang.String)` in favor of `getPartitionsForTopic(java.lang.String, boolean metadataAutoCreationEnabled)`. + [[what-s-new-in-1-1-since-1-0]] == What's New in 1.1 Since 1.0 :page-section-summary-toc: 1 diff --git a/spring-pulsar-sample-apps/sample-failover-custom-router/compose.yaml b/spring-pulsar-sample-apps/sample-failover-custom-router/compose.yaml index 6ab2dc9b..42168e46 100644 --- a/spring-pulsar-sample-apps/sample-failover-custom-router/compose.yaml +++ b/spring-pulsar-sample-apps/sample-failover-custom-router/compose.yaml @@ -1,6 +1,6 @@ services: pulsar: - image: 'apachepulsar/pulsar:3.3.0' + image: 'apachepulsar/pulsar:3.3.1' ports: - '6650' - '8080' diff --git a/spring-pulsar-sample-apps/sample-imperative-produce-consume/compose.yaml b/spring-pulsar-sample-apps/sample-imperative-produce-consume/compose.yaml index 6ab2dc9b..42168e46 100644 --- a/spring-pulsar-sample-apps/sample-imperative-produce-consume/compose.yaml +++ b/spring-pulsar-sample-apps/sample-imperative-produce-consume/compose.yaml @@ -1,6 +1,6 @@ services: pulsar: - image: 'apachepulsar/pulsar:3.3.0' + image: 'apachepulsar/pulsar:3.3.1' ports: - '6650' - '8080' diff --git a/spring-pulsar-sample-apps/sample-pulsar-binder/compose.yaml b/spring-pulsar-sample-apps/sample-pulsar-binder/compose.yaml index 6ab2dc9b..42168e46 100644 --- a/spring-pulsar-sample-apps/sample-pulsar-binder/compose.yaml +++ b/spring-pulsar-sample-apps/sample-pulsar-binder/compose.yaml @@ -1,6 +1,6 @@ services: pulsar: - image: 'apachepulsar/pulsar:3.3.0' + image: 'apachepulsar/pulsar:3.3.1' ports: - '6650' - '8080' diff --git a/spring-pulsar-sample-apps/sample-pulsar-functions/download-connectors.sh b/spring-pulsar-sample-apps/sample-pulsar-functions/download-connectors.sh index 086072a7..c41ac2d2 100755 --- a/spring-pulsar-sample-apps/sample-pulsar-functions/download-connectors.sh +++ b/spring-pulsar-sample-apps/sample-pulsar-functions/download-connectors.sh @@ -2,6 +2,6 @@ mkdir connectors cd connectors -wget https://archive.apache.org/dist/pulsar/pulsar-3.3.0/connectors/pulsar-io-cassandra-3.3.0.nar -wget https://archive.apache.org/dist/pulsar/pulsar-3.3.0/connectors/pulsar-io-rabbitmq-3.3.0.nar +wget https://archive.apache.org/dist/pulsar/pulsar-3.3.1/connectors/pulsar-io-cassandra-3.3.1.nar +wget https://archive.apache.org/dist/pulsar/pulsar-3.3.1/connectors/pulsar-io-rabbitmq-3.3.1.nar cd .. diff --git a/spring-pulsar-sample-apps/sample-pulsar-reader/compose.yaml b/spring-pulsar-sample-apps/sample-pulsar-reader/compose.yaml index 6ab2dc9b..42168e46 100644 --- a/spring-pulsar-sample-apps/sample-pulsar-reader/compose.yaml +++ b/spring-pulsar-sample-apps/sample-pulsar-reader/compose.yaml @@ -1,6 +1,6 @@ services: pulsar: - image: 'apachepulsar/pulsar:3.3.0' + image: 'apachepulsar/pulsar:3.3.1' ports: - '6650' - '8080' diff --git a/spring-pulsar-sample-apps/sample-reactive/compose.yaml b/spring-pulsar-sample-apps/sample-reactive/compose.yaml index 6ab2dc9b..42168e46 100644 --- a/spring-pulsar-sample-apps/sample-reactive/compose.yaml +++ b/spring-pulsar-sample-apps/sample-reactive/compose.yaml @@ -1,6 +1,6 @@ services: pulsar: - image: 'apachepulsar/pulsar:3.3.0' + image: 'apachepulsar/pulsar:3.3.1' ports: - '6650' - '8080' diff --git a/spring-pulsar/src/main/java/org/springframework/pulsar/core/PulsarClientProxy.java b/spring-pulsar/src/main/java/org/springframework/pulsar/core/PulsarClientProxy.java index 85227b7b..5314cd16 100644 --- a/spring-pulsar/src/main/java/org/springframework/pulsar/core/PulsarClientProxy.java +++ b/spring-pulsar/src/main/java/org/springframework/pulsar/core/PulsarClientProxy.java @@ -170,11 +170,24 @@ final class PulsarClientProxy extends RestartableSingletonFactory this.getInstance().updateServiceUrl(serviceUrl); } + /** + * Get the list of partitions for a given topic. + * @param topic the topic name + * @return a future that will yield a list of the topic partitions + * @deprecated in favor of {@link #getPartitionsForTopic(String, boolean)} + * @see PulsarClient#getPartitionsForTopic(String) + */ @Override + @Deprecated(since = "1.2.0", forRemoval = true) public CompletableFuture> getPartitionsForTopic(String topic) { return this.getInstance().getPartitionsForTopic(topic); } + @Override + public CompletableFuture> getPartitionsForTopic(String topic, boolean metadataAutoCreationEnabled) { + return this.getInstance().getPartitionsForTopic(topic, metadataAutoCreationEnabled); + } + @Override public void close() throws PulsarClientException { this.getInstance().close(); diff --git a/spring-pulsar/src/test/java/org/springframework/pulsar/core/PulsarClientProxyTests.java b/spring-pulsar/src/test/java/org/springframework/pulsar/core/PulsarClientProxyTests.java index 64bb6848..a11c2ba8 100644 --- a/spring-pulsar/src/test/java/org/springframework/pulsar/core/PulsarClientProxyTests.java +++ b/spring-pulsar/src/test/java/org/springframework/pulsar/core/PulsarClientProxyTests.java @@ -165,6 +165,13 @@ class PulsarClientProxyTests implements PulsarTestContainerSupport { @Test void getPartitionsForTopic() { + this.restartableClient.getPartitionsForTopic("zTopic", true); + verify(this.delegateClient).getPartitionsForTopic("zTopic", true); + } + + @Test + @SuppressWarnings({ "deprecation", "removal" }) + void getPartitionsForTopicDeprecated() { this.restartableClient.getPartitionsForTopic("zTopic"); verify(this.delegateClient).getPartitionsForTopic("zTopic"); } diff --git a/tools/pulsar/docker/standalone/pulsar-start.sh b/tools/pulsar/docker/standalone/pulsar-start.sh index 9fd9aadb..9ff4b5b1 100755 --- a/tools/pulsar/docker/standalone/pulsar-start.sh +++ b/tools/pulsar/docker/standalone/pulsar-start.sh @@ -3,5 +3,5 @@ docker run -it -p 6650:6650 -p 8080:8080 \ --mount source=pulsardata,target=/pulsar/data \ --mount source=pulsarconf,target=/pulsar/conf \ - apachepulsar/pulsar:3.3.0 \ + apachepulsar/pulsar:3.3.1 \ bin/pulsar standalone