Update to Pulsar 3.3.1 (#772)

* Update to Pulsar 3.3.1

* Handles deprecation to PulsarClient.getPartitionsForTopic(String)

* Adds support to PulsarClientProxy for newly added
PulsarClient.getPartitionsForTopic(String, boolean)

* Add deprecation note to "What's New" doc

Resolves #767
This commit is contained in:
Chris Bono
2024-08-10 21:24:19 -05:00
committed by GitHub
parent db77d870f2
commit 4981b28c2d
11 changed files with 34 additions and 9 deletions

View File

@@ -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"

View File

@@ -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

View File

@@ -1,6 +1,6 @@
services:
pulsar:
image: 'apachepulsar/pulsar:3.3.0'
image: 'apachepulsar/pulsar:3.3.1'
ports:
- '6650'
- '8080'

View File

@@ -1,6 +1,6 @@
services:
pulsar:
image: 'apachepulsar/pulsar:3.3.0'
image: 'apachepulsar/pulsar:3.3.1'
ports:
- '6650'
- '8080'

View File

@@ -1,6 +1,6 @@
services:
pulsar:
image: 'apachepulsar/pulsar:3.3.0'
image: 'apachepulsar/pulsar:3.3.1'
ports:
- '6650'
- '8080'

View File

@@ -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 ..

View File

@@ -1,6 +1,6 @@
services:
pulsar:
image: 'apachepulsar/pulsar:3.3.0'
image: 'apachepulsar/pulsar:3.3.1'
ports:
- '6650'
- '8080'

View File

@@ -1,6 +1,6 @@
services:
pulsar:
image: 'apachepulsar/pulsar:3.3.0'
image: 'apachepulsar/pulsar:3.3.1'
ports:
- '6650'
- '8080'

View File

@@ -170,11 +170,24 @@ final class PulsarClientProxy extends RestartableSingletonFactory<PulsarClient>
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<List<String>> getPartitionsForTopic(String topic) {
return this.getInstance().getPartitionsForTopic(topic);
}
@Override
public CompletableFuture<List<String>> getPartitionsForTopic(String topic, boolean metadataAutoCreationEnabled) {
return this.getInstance().getPartitionsForTopic(topic, metadataAutoCreationEnabled);
}
@Override
public void close() throws PulsarClientException {
this.getInstance().close();

View File

@@ -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");
}

View File

@@ -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