(pulsar) branch master updated: [cleanup][broker] Remove warn logs when changing the state from Owned to Free (Extensible LB) (#22708)

2024-05-14 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
 new 22a9023acd2 [cleanup][broker] Remove warn logs when changing the state 
from Owned to Free (Extensible LB) (#22708)
22a9023acd2 is described below

commit 22a9023acd231efea34e4f2cd7389b89eaec5435
Author: Yunze Xu 
AuthorDate: Wed May 15 12:57:17 2024 +0800

[cleanup][broker] Remove warn logs when changing the state from Owned to 
Free (Extensible LB) (#22708)
---
 .../channel/ServiceUnitStateChannelImpl.java   | 36 ++
 1 file changed, 9 insertions(+), 27 deletions(-)

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/channel/ServiceUnitStateChannelImpl.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/channel/ServiceUnitStateChannelImpl.java
index bf6266482f8..9821ce56420 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/channel/ServiceUnitStateChannelImpl.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/channel/ServiceUnitStateChannelImpl.java
@@ -1284,34 +1284,16 @@ public class ServiceUnitStateChannelImpl implements 
ServiceUnitStateChannel {
 }
 
 
-private ServiceUnitStateData 
getOverrideInactiveBrokerStateData(ServiceUnitStateData orphanData,
-
Optional selectedBroker,
-String 
inactiveBroker) {
-
-
-if (selectedBroker.isEmpty()) {
-return new ServiceUnitStateData(Free, null, inactiveBroker,
-true, getNextVersionId(orphanData));
-}
-
-if (orphanData.state() == Splitting) {
-return new ServiceUnitStateData(Splitting, orphanData.dstBroker(), 
selectedBroker.get(),
-Map.copyOf(orphanData.splitServiceUnitToDestBroker()),
-true, getNextVersionId(orphanData));
-} else {
-return new ServiceUnitStateData(Owned, selectedBroker.get(), 
inactiveBroker,
-true, getNextVersionId(orphanData));
-}
-}
-
 private void overrideOwnership(String serviceUnit, ServiceUnitStateData 
orphanData, String inactiveBroker) {
-Optional selectedBroker = selectBroker(serviceUnit, 
inactiveBroker);
-if (selectedBroker.isEmpty()) {
-log.warn("Empty selected broker for ownership serviceUnit:{} 
orphanData:{}."
-+ "totalCleanupErrorCnt:{}",
-serviceUnit, orphanData, 
totalCleanupErrorCnt.incrementAndGet());
-}
-var override = getOverrideInactiveBrokerStateData(orphanData, 
selectedBroker, inactiveBroker);
+final var version = getNextVersionId(orphanData);
+final var override = selectBroker(serviceUnit, 
inactiveBroker).map(selectedBroker -> {
+if (orphanData.state() == Splitting) {
+return new ServiceUnitStateData(Splitting, 
orphanData.dstBroker(), selectedBroker,
+Map.copyOf(orphanData.splitServiceUnitToDestBroker()), 
true, version);
+} else {
+return new ServiceUnitStateData(Owned, selectedBroker, 
inactiveBroker, true, version);
+}
+}).orElseGet(() -> new ServiceUnitStateData(Free, null, 
inactiveBroker, true, version));
 log.info("Overriding ownership serviceUnit:{} from orphanData:{} to 
overrideData:{}",
 serviceUnit, orphanData, override);
 publishOverrideEventAsync(serviceUnit, orphanData, override)



(pulsar) branch master updated: [improve][broker] Make BrokerSelectionStrategy pluggable (#22553)

2024-04-23 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
 new 89b201ed8a4 [improve][broker] Make BrokerSelectionStrategy pluggable 
(#22553)
89b201ed8a4 is described below

commit 89b201ed8a49877e0a7148b060af945b29074b02
Author: Yunze Xu 
AuthorDate: Tue Apr 23 18:52:49 2024 +0800

[improve][broker] Make BrokerSelectionStrategy pluggable (#22553)
---
 .../extensions/ExtensibleLoadManagerImpl.java  | 11 ++-
 .../strategy/BrokerSelectionStrategy.java  |  2 +
 ...gy.java => BrokerSelectionStrategyFactory.java} | 24 +-
 .../CustomBrokerSelectionStrategyTest.java | 86 ++
 4 files changed, 100 insertions(+), 23 deletions(-)

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManagerImpl.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManagerImpl.java
index a20694356b1..41832fb6007 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManagerImpl.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManagerImpl.java
@@ -85,6 +85,7 @@ import 
org.apache.pulsar.broker.loadbalance.extensions.store.LoadDataStore;
 import 
org.apache.pulsar.broker.loadbalance.extensions.store.LoadDataStoreException;
 import 
org.apache.pulsar.broker.loadbalance.extensions.store.LoadDataStoreFactory;
 import 
org.apache.pulsar.broker.loadbalance.extensions.strategy.BrokerSelectionStrategy;
+import 
org.apache.pulsar.broker.loadbalance.extensions.strategy.BrokerSelectionStrategyFactory;
 import 
org.apache.pulsar.broker.loadbalance.extensions.strategy.LeastResourceUsageWithWeight;
 import org.apache.pulsar.broker.loadbalance.impl.LoadManagerShared;
 import 
org.apache.pulsar.broker.loadbalance.impl.SimpleResourceAllocationPolicies;
@@ -104,7 +105,7 @@ import 
org.apache.pulsar.metadata.api.coordination.LeaderElectionState;
 import org.slf4j.Logger;
 
 @Slf4j
-public class ExtensibleLoadManagerImpl implements ExtensibleLoadManager {
+public class ExtensibleLoadManagerImpl implements ExtensibleLoadManager, 
BrokerSelectionStrategyFactory {
 
 public static final String BROKER_LOAD_DATA_STORE_TOPIC = TopicName.get(
 TopicDomain.non_persistent.value(),
@@ -252,6 +253,11 @@ public class ExtensibleLoadManagerImpl implements 
ExtensibleLoadManager {
 return ownedServiceUnits;
 }
 
+@Override
+public BrokerSelectionStrategy createBrokerSelectionStrategy() {
+return new LeastResourceUsageWithWeight();
+}
+
 public enum Role {
 Leader,
 Follower
@@ -267,8 +273,7 @@ public class ExtensibleLoadManagerImpl implements 
ExtensibleLoadManager {
 this.brokerFilterPipeline.add(new BrokerLoadManagerClassFilter());
 this.brokerFilterPipeline.add(new BrokerMaxTopicCountFilter());
 this.brokerFilterPipeline.add(new BrokerVersionFilter());
-// TODO: Make brokerSelectionStrategy configurable.
-this.brokerSelectionStrategy = new LeastResourceUsageWithWeight();
+this.brokerSelectionStrategy = createBrokerSelectionStrategy();
 }
 
 public static boolean isLoadManagerExtensionEnabled(PulsarService pulsar) {
diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/strategy/BrokerSelectionStrategy.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/strategy/BrokerSelectionStrategy.java
index e0a9122383c..b240cb5b5f6 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/strategy/BrokerSelectionStrategy.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/strategy/BrokerSelectionStrategy.java
@@ -21,11 +21,13 @@ package 
org.apache.pulsar.broker.loadbalance.extensions.strategy;
 import java.util.Optional;
 import java.util.Set;
 import org.apache.pulsar.broker.loadbalance.extensions.LoadManagerContext;
+import org.apache.pulsar.common.classification.InterfaceStability;
 import org.apache.pulsar.common.naming.ServiceUnitId;
 
 /**
  * The broker selection strategy is designed to select the broker according to 
different implementations.
  */
+@InterfaceStability.Evolving
 public interface BrokerSelectionStrategy {
 
 /**
diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/strategy/BrokerSelectionStrategy.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/strategy/BrokerSelectionStrategyFactory.java
similarity index 51%
copy from 
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/strategy/BrokerSelectionStrategy.java
copy to 
pulsar-broker/src/main/java/org/apache/pulsar/bro

(pulsar) branch master updated (7fe92ac43cf -> 358c7cc6bbb)

2024-04-23 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


from 7fe92ac43cf [fix][broker] Support lookup options for extensible load 
manager (#22487)
 add 358c7cc6bbb [fix][ci] Don't allow merging PR without successful result 
(#22563)

No new revisions were added by this update.

Summary of changes:
 .github/workflows/pulsar-ci.yaml | 15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)



(pulsar) branch master updated: [fix][broker] Support lookup options for extensible load manager (#22487)

2024-04-23 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
 new 7fe92ac43cf [fix][broker] Support lookup options for extensible load 
manager (#22487)
7fe92ac43cf is described below

commit 7fe92ac43cfd2f2de5576a023498aac8b46c7ac8
Author: Kai Wang 
AuthorDate: Tue Apr 23 15:22:44 2024 +0800

[fix][broker] Support lookup options for extensible load manager (#22487)
---
 .../pulsar/broker/loadbalance/LoadManager.java |  3 +-
 .../extensions/ExtensibleLoadManager.java  |  5 +-
 .../extensions/ExtensibleLoadManagerImpl.java  | 53 +-
 .../extensions/ExtensibleLoadManagerWrapper.java   | 15 +++--
 .../channel/ServiceUnitStateChannelImpl.java   |  4 +-
 .../extensions/data/BrokerLookupData.java  | 17 +-
 .../pulsar/broker/namespace/NamespaceService.java  |  4 +-
 .../AntiAffinityNamespaceGroupExtensionTest.java   |  4 +-
 .../ExtensibleLoadManagerImplBaseTest.java |  4 ++
 .../extensions/ExtensibleLoadManagerImplTest.java  | 65 ++
 .../channel/ServiceUnitStateChannelTest.java   | 14 ++---
 .../extensions/data/BrokerLookupDataTest.java  | 32 ++-
 .../loadbalance/ExtensibleLoadManagerTest.java |  3 +-
 13 files changed, 162 insertions(+), 61 deletions(-)

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/LoadManager.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/LoadManager.java
index 2cce68b60cb..0dd5d948480 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/LoadManager.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/LoadManager.java
@@ -31,6 +31,7 @@ import 
org.apache.pulsar.broker.loadbalance.extensions.ExtensibleLoadManagerWrap
 import org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerWrapper;
 import org.apache.pulsar.broker.loadbalance.impl.SimpleLoadManagerImpl;
 import org.apache.pulsar.broker.lookup.LookupResult;
+import org.apache.pulsar.broker.namespace.LookupOptions;
 import org.apache.pulsar.common.naming.ServiceUnitId;
 import org.apache.pulsar.common.stats.Metrics;
 import org.apache.pulsar.common.util.Reflections;
@@ -63,7 +64,7 @@ public interface LoadManager {
 Optional getLeastLoaded(ServiceUnitId su) throws Exception;
 
 default CompletableFuture> findBrokerServiceUrl(
-Optional topic, ServiceUnitId bundle) {
+Optional topic, ServiceUnitId bundle, LookupOptions 
options) {
 throw new UnsupportedOperationException();
 }
 
diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManager.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManager.java
index b7da70d1cf1..eabf6005b43 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManager.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManager.java
@@ -60,9 +60,12 @@ public interface ExtensibleLoadManager extends Closeable {
  *  (e.g. {@link 
NamespaceService#internalGetWebServiceUrl(NamespaceBundle, LookupOptions)}),
  *  So the topic is optional.
  * @param serviceUnit service unit (e.g. bundle).
+ * @param options The lookup options.
  * @return The broker lookup data.
  */
-CompletableFuture> 
assign(Optional topic, ServiceUnitId serviceUnit);
+CompletableFuture> 
assign(Optional topic,
+ ServiceUnitId 
serviceUnit,
+ LookupOptions 
options);
 
 /**
  * Check the incoming service unit is owned by the current broker.
diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManagerImpl.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManagerImpl.java
index c8cf1c05756..a20694356b1 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManagerImpl.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManagerImpl.java
@@ -88,6 +88,7 @@ import 
org.apache.pulsar.broker.loadbalance.extensions.strategy.BrokerSelectionS
 import 
org.apache.pulsar.broker.loadbalance.extensions.strategy.LeastResourceUsageWithWeight;
 import org.apache.pulsar.broker.loadbalance.impl.LoadManagerShared;
 import 
org.apache.pulsar.broker.loadbalance.impl.SimpleResourceAllocationPolicies;
+import org.apache.pulsar.broker.namespace.LookupOptions;
 import org.apache.pulsar.broker.namespace.NamespaceEphemeralData;
 import org.apache.pulsar.broker.namespace.Namespa

(pulsar) branch master updated: [improve][broker] Apply loadBalancerDebugModeEnabled in LeastResourceUsageWithWeight (#22549)

2024-04-22 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
 new 882ce415c94 [improve][broker] Apply loadBalancerDebugModeEnabled in 
LeastResourceUsageWithWeight (#22549)
882ce415c94 is described below

commit 882ce415c94db215c6f06aa5212b6d321231e35e
Author: Yunze Xu 
AuthorDate: Tue Apr 23 13:42:22 2024 +0800

[improve][broker] Apply loadBalancerDebugModeEnabled in 
LeastResourceUsageWithWeight (#22549)
---
 .../loadbalance/extensions/strategy/LeastResourceUsageWithWeight.java  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/strategy/LeastResourceUsageWithWeight.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/strategy/LeastResourceUsageWithWeight.java
index 98986d84b98..9bf16ac1795 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/strategy/LeastResourceUsageWithWeight.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/strategy/LeastResourceUsageWithWeight.java
@@ -96,8 +96,7 @@ public class LeastResourceUsageWithWeight implements 
BrokerSelectionStrategy {
 // select one of them at the end.
 double totalUsage = 0.0d;
 
-// TODO: use loadBalancerDebugModeEnabled too.
-boolean debugMode = log.isDebugEnabled();
+boolean debugMode = log.isDebugEnabled() || 
conf.isLoadBalancerDebugModeEnabled();
 for (String broker : candidates) {
 var brokerLoadDataOptional = 
context.brokerLoadDataStore().get(broker);
 if (brokerLoadDataOptional.isEmpty()) {



(pulsar-client-go) branch master updated: [Improve] Add admin api GetLeaderBroker (#1203)

2024-04-22 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-go.git


The following commit(s) were added to refs/heads/master by this push:
 new b4d45cd3 [Improve] Add admin api GetLeaderBroker (#1203)
b4d45cd3 is described below

commit b4d45cd360599b52e3f160db9d39d619889c556a
Author: crossoverJie 
AuthorDate: Mon Apr 22 21:25:00 2024 +0800

[Improve] Add admin api GetLeaderBroker (#1203)

### Motivation

To keep consistent with the [Java 
client](https://github.com/apache/pulsar/pull/9799).

### Modifications

Add `GetLeaderBroker` interface.
---
 pulsaradmin/pkg/admin/brokers.go  | 12 
 pulsaradmin/pkg/admin/brokers_test.go | 16 
 pulsaradmin/pkg/utils/data.go |  5 +
 3 files changed, 33 insertions(+)

diff --git a/pulsaradmin/pkg/admin/brokers.go b/pulsaradmin/pkg/admin/brokers.go
index e178610c..650fab8e 100644
--- a/pulsaradmin/pkg/admin/brokers.go
+++ b/pulsaradmin/pkg/admin/brokers.go
@@ -58,6 +58,9 @@ type Brokers interface {
 
// HealthCheckWithTopicVersion run a health check on the broker
HealthCheckWithTopicVersion(utils.TopicVersion) error
+
+   // GetLeaderBroker get the information of the leader broker.
+   GetLeaderBroker() (utils.BrokerInfo, error)
 }
 
 type broker struct {
@@ -162,3 +165,12 @@ func (b *broker) HealthCheckWithTopicVersion(topicVersion 
utils.TopicVersion) er
}
return nil
 }
+func (b *broker) GetLeaderBroker() (utils.BrokerInfo, error) {
+   endpoint := b.pulsar.endpoint(b.basePath, "/leaderBroker")
+   var brokerInfo utils.BrokerInfo
+   err := b.pulsar.Client.Get(endpoint, )
+   if err != nil {
+   return brokerInfo, err
+   }
+   return brokerInfo, nil
+}
diff --git a/pulsaradmin/pkg/admin/brokers_test.go 
b/pulsaradmin/pkg/admin/brokers_test.go
index d48ce7cb..97679759 100644
--- a/pulsaradmin/pkg/admin/brokers_test.go
+++ b/pulsaradmin/pkg/admin/brokers_test.go
@@ -42,3 +42,19 @@ func TestBrokerHealthCheckWithTopicVersion(t *testing.T) {
err = admin.Brokers().HealthCheckWithTopicVersion(utils.TopicVersionV2)
assert.NoError(t, err)
 }
+
+func TestGetLeaderBroker(t *testing.T) {
+   readFile, err := 
os.ReadFile("../../../integration-tests/tokens/admin-token")
+   assert.NoError(t, err)
+   cfg := {
+   Token: string(readFile),
+   }
+   admin, err := New(cfg)
+   assert.NoError(t, err)
+   assert.NotNil(t, admin)
+   leaderBroker, err := admin.Brokers().GetLeaderBroker()
+   assert.NoError(t, err)
+   assert.NotNil(t, leaderBroker)
+   assert.NotEmpty(t, leaderBroker.ServiceURL)
+   assert.NotEmpty(t, leaderBroker.BrokerID)
+}
diff --git a/pulsaradmin/pkg/utils/data.go b/pulsaradmin/pkg/utils/data.go
index 1e67e3c7..61607912 100644
--- a/pulsaradmin/pkg/utils/data.go
+++ b/pulsaradmin/pkg/utils/data.go
@@ -477,6 +477,11 @@ type GetStatsOptions struct {
ExcludeConsumers bool `json:"exclude_consumers"`
 }
 
+type BrokerInfo struct {
+   BrokerID   string `json:"brokerId"`
+   ServiceURL string `json:"serviceUrl"`
+}
+
 type TopicVersion string
 
 const (



(pulsar-client-go) branch master updated: [improve] add a lint-docker command in makefile (#1207)

2024-04-22 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-go.git


The following commit(s) were added to refs/heads/master by this push:
 new 13ecca24 [improve] add a lint-docker command in makefile (#1207)
13ecca24 is described below

commit 13ecca24ffb6b65ac7ec36da53ecb67479518647
Author: zhou zhuohan <843520...@qq.com>
AuthorDate: Mon Apr 22 21:23:49 2024 +0800

[improve] add a lint-docker command in makefile (#1207)

Co-authored-by: ninjazhou 
---
 Makefile | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/Makefile b/Makefile
index df4d539d..cdae8a59 100644
--- a/Makefile
+++ b/Makefile
@@ -38,6 +38,12 @@ lint: bin/golangci-lint
 bin/golangci-lint:
GOBIN=$(shell pwd)/bin go install 
github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2
 
+# an alternative to above `make lint` command
+# use golangCi-lint docker to avoid local golang env issues
+# https://golangci-lint.run/welcome/install/
+lint-docker:
+   docker run --rm -v $(shell pwd):/app -w /app 
golangci/golangci-lint:v1.51.2 golangci-lint run -v
+
 container:
docker build -t ${IMAGE_NAME} \
  --build-arg GO_VERSION="${GO_VERSION}" \



(pulsar-site) branch bewaremypower/py-docs-3.5.0 deleted (was 03b7f06951c8)

2024-04-17 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch bewaremypower/py-docs-3.5.0
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


 was 03b7f06951c8 Generate Python client 3.5.0 doc

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(pulsar-site) branch main updated: Add the release note for Python client 3.5.0 (#888)

2024-04-17 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


The following commit(s) were added to refs/heads/main by this push:
 new b1316bc133f3 Add the release note for Python client 3.5.0 (#888)
b1316bc133f3 is described below

commit b1316bc133f3bbf06b328af472815cba43a7991a
Author: Yunze Xu 
AuthorDate: Thu Apr 18 11:11:03 2024 +0800

Add the release note for Python client 3.5.0 (#888)
---
 data/release-python.js |  1 +
 release-notes/versioned/client-python-3.5.0.md | 30 ++
 2 files changed, 31 insertions(+)

diff --git a/data/release-python.js b/data/release-python.js
index eb81e67f9ba6..a059bb4c0f7a 100644
--- a/data/release-python.js
+++ b/data/release-python.js
@@ -1,4 +1,5 @@
 module.exports = [
+{tagName: 
"v3.5.0",vtag:"3.5.x",releaseNotes:"/release-notes/versioned/client-python-3.5.0/",doc:"/docs/client-libraries-python",version:"v3.5.x"},
 {tagName: 
"v3.4.0",vtag:"3.4.x",releaseNotes:"/release-notes/versioned/client-python-3.4.0/",doc:"/docs/client-libraries-python",version:"v3.4.x"},
 {tagName: 
"v3.3.0",vtag:"3.3.x",releaseNotes:"/release-notes/versioned/client-python-3.3.0/",doc:"/docs/client-libraries-python",version:"v3.3.x"},
 {tagName: 
"v3.2.0",vtag:"3.2.x",releaseNotes:"/release-notes/versioned/client-python-3.2.0/",doc:"/docs/client-libraries-python",version:"v3.2.x"},
diff --git a/release-notes/versioned/client-python-3.5.0.md 
b/release-notes/versioned/client-python-3.5.0.md
new file mode 100644
index ..33980a9716c2
--- /dev/null
+++ b/release-notes/versioned/client-python-3.5.0.md
@@ -0,0 +1,30 @@
+---
+id: client-python-3.5.0
+title: Client Python 3.5.0
+sidebar_label: Client Python 3.5.0
+---
+
+## What's Changed
+* Fix incorrect command in release doc by @RobertIndie in 
https://github.com/apache/pulsar-client-python/pull/176
+* Fix incorrect python spec name for release wheels workflow by @RobertIndie 
in https://github.com/apache/pulsar-client-python/pull/177
+* Fix incorrect version upgrade command in RELEASE.md by @RobertIndie in 
https://github.com/apache/pulsar-client-python/pull/179
+* Fix negative acknowledge on a message ID does not work by @BewareMyPower in 
https://github.com/apache/pulsar-client-python/pull/180
+* Fix windows release CI doesn't show the python version by @RobertIndie in 
https://github.com/apache/pulsar-client-python/pull/182
+* Fix missing dependency of setuptools by @RobertIndie in 
https://github.com/apache/pulsar-client-python/pull/183
+* Fix the incompatibility with Python 3.12 and drop the support for 3.7 by 
@BewareMyPower in https://github.com/apache/pulsar-client-python/pull/181
+* Document the requirement for the send_async method by @BewareMyPower in 
https://github.com/apache/pulsar-client-python/pull/186
+* Bumped version to 3.5.0a1 by @RobertIndie in 
https://github.com/apache/pulsar-client-python/pull/191
+* Fix the release doc for PyPI login and release note sample PR by 
@RobertIndie in https://github.com/apache/pulsar-client-python/pull/192
+* [asyncio] Support creating producer and sending messages by @BewareMyPower 
in https://github.com/apache/pulsar-client-python/pull/189
+* [docs] Add guide to avoid logs from the default logger by @BewareMyPower in 
https://github.com/apache/pulsar-client-python/pull/195
+* Disable topic level policies to make tests work for latest Pulsar by 
@BewareMyPower in https://github.com/apache/pulsar-client-python/pull/201
+* Fix incorrect logs when a message failed to be decoded with the writer 
schema by @BewareMyPower in 
https://github.com/apache/pulsar-client-python/pull/200
+* Enable CodeQL static scanner by @merlimat in 
https://github.com/apache/pulsar-client-python/pull/197
+* Upgrade the C++ client to 3.5.0 for some bug fixes by @BewareMyPower in 
https://github.com/apache/pulsar-client-python/pull/202
+* Fix incorrect type hints in Client by @BewareMyPower in 
https://github.com/apache/pulsar-client-python/pull/204
+* Add documents for the batching arguments when creating producer by 
@BewareMyPower in https://github.com/apache/pulsar-client-python/pull/205
+* Add Consumer.consumer_name() API by @BewareMyPower in 
https://github.com/apache/pulsar-client-python/pull/206
+* Upgrade the C++ client to 3.5.1 by @BewareMyPower in 
https://github.com/apache/pulsar-client-python/pull/209
+
+
+**Full Changelog**: 
https://github.com/apache/pulsar-client-python/compare/v3.4.0...v3.5.0



(pulsar-site) branch bewaremypower/release-note-python-3.5.0 deleted (was 1bed3bbee978)

2024-04-17 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch bewaremypower/release-note-python-3.5.0
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


 was 1bed3bbee978 Add the release note for Python client 3.5.0

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(pulsar-site) branch bewaremypower/py-docs-3.5.0 created (now 03b7f06951c8)

2024-04-17 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch bewaremypower/py-docs-3.5.0
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


  at 03b7f06951c8 Generate Python client 3.5.0 doc

This branch includes the following new commits:

 new 03b7f06951c8 Generate Python client 3.5.0 doc

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




(pulsar-site) 01/01: Add the release note for Python client 3.5.0

2024-04-17 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch bewaremypower/release-note-python-3.5.0
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git

commit 1bed3bbee9780b85dfe248281667eace8aa7103e
Author: Yunze Xu 
AuthorDate: Thu Apr 18 11:02:26 2024 +0800

Add the release note for Python client 3.5.0
---
 data/release-python.js |  1 +
 release-notes/versioned/client-python-3.5.0.md | 30 ++
 2 files changed, 31 insertions(+)

diff --git a/data/release-python.js b/data/release-python.js
index eb81e67f9ba6..a059bb4c0f7a 100644
--- a/data/release-python.js
+++ b/data/release-python.js
@@ -1,4 +1,5 @@
 module.exports = [
+{tagName: 
"v3.5.0",vtag:"3.5.x",releaseNotes:"/release-notes/versioned/client-python-3.5.0/",doc:"/docs/client-libraries-python",version:"v3.5.x"},
 {tagName: 
"v3.4.0",vtag:"3.4.x",releaseNotes:"/release-notes/versioned/client-python-3.4.0/",doc:"/docs/client-libraries-python",version:"v3.4.x"},
 {tagName: 
"v3.3.0",vtag:"3.3.x",releaseNotes:"/release-notes/versioned/client-python-3.3.0/",doc:"/docs/client-libraries-python",version:"v3.3.x"},
 {tagName: 
"v3.2.0",vtag:"3.2.x",releaseNotes:"/release-notes/versioned/client-python-3.2.0/",doc:"/docs/client-libraries-python",version:"v3.2.x"},
diff --git a/release-notes/versioned/client-python-3.5.0.md 
b/release-notes/versioned/client-python-3.5.0.md
new file mode 100644
index ..33980a9716c2
--- /dev/null
+++ b/release-notes/versioned/client-python-3.5.0.md
@@ -0,0 +1,30 @@
+---
+id: client-python-3.5.0
+title: Client Python 3.5.0
+sidebar_label: Client Python 3.5.0
+---
+
+## What's Changed
+* Fix incorrect command in release doc by @RobertIndie in 
https://github.com/apache/pulsar-client-python/pull/176
+* Fix incorrect python spec name for release wheels workflow by @RobertIndie 
in https://github.com/apache/pulsar-client-python/pull/177
+* Fix incorrect version upgrade command in RELEASE.md by @RobertIndie in 
https://github.com/apache/pulsar-client-python/pull/179
+* Fix negative acknowledge on a message ID does not work by @BewareMyPower in 
https://github.com/apache/pulsar-client-python/pull/180
+* Fix windows release CI doesn't show the python version by @RobertIndie in 
https://github.com/apache/pulsar-client-python/pull/182
+* Fix missing dependency of setuptools by @RobertIndie in 
https://github.com/apache/pulsar-client-python/pull/183
+* Fix the incompatibility with Python 3.12 and drop the support for 3.7 by 
@BewareMyPower in https://github.com/apache/pulsar-client-python/pull/181
+* Document the requirement for the send_async method by @BewareMyPower in 
https://github.com/apache/pulsar-client-python/pull/186
+* Bumped version to 3.5.0a1 by @RobertIndie in 
https://github.com/apache/pulsar-client-python/pull/191
+* Fix the release doc for PyPI login and release note sample PR by 
@RobertIndie in https://github.com/apache/pulsar-client-python/pull/192
+* [asyncio] Support creating producer and sending messages by @BewareMyPower 
in https://github.com/apache/pulsar-client-python/pull/189
+* [docs] Add guide to avoid logs from the default logger by @BewareMyPower in 
https://github.com/apache/pulsar-client-python/pull/195
+* Disable topic level policies to make tests work for latest Pulsar by 
@BewareMyPower in https://github.com/apache/pulsar-client-python/pull/201
+* Fix incorrect logs when a message failed to be decoded with the writer 
schema by @BewareMyPower in 
https://github.com/apache/pulsar-client-python/pull/200
+* Enable CodeQL static scanner by @merlimat in 
https://github.com/apache/pulsar-client-python/pull/197
+* Upgrade the C++ client to 3.5.0 for some bug fixes by @BewareMyPower in 
https://github.com/apache/pulsar-client-python/pull/202
+* Fix incorrect type hints in Client by @BewareMyPower in 
https://github.com/apache/pulsar-client-python/pull/204
+* Add documents for the batching arguments when creating producer by 
@BewareMyPower in https://github.com/apache/pulsar-client-python/pull/205
+* Add Consumer.consumer_name() API by @BewareMyPower in 
https://github.com/apache/pulsar-client-python/pull/206
+* Upgrade the C++ client to 3.5.1 by @BewareMyPower in 
https://github.com/apache/pulsar-client-python/pull/209
+
+
+**Full Changelog**: 
https://github.com/apache/pulsar-client-python/compare/v3.4.0...v3.5.0



(pulsar-site) branch bewaremypower/release-note-python-3.5.0 created (now 1bed3bbee978)

2024-04-17 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch bewaremypower/release-note-python-3.5.0
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


  at 1bed3bbee978 Add the release note for Python client 3.5.0

This branch includes the following new commits:

 new 1bed3bbee978 Add the release note for Python client 3.5.0

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




(pulsar) branch master updated (56970b714f5 -> d0b9d471d53)

2024-04-17 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


from 56970b714f5 [improve][test] Move ShadowManagedLedgerImplTest to flaky 
tests (#22526)
 add d0b9d471d53 [fix][broker] Check the broker is available for the SLA 
monitor bundle when the ExtensibleLoadManager is enabled (#22485)

No new revisions were added by this update.

Summary of changes:
 .../extensions/ExtensibleLoadManagerImpl.java  | 39 +++---
 .../pulsar/broker/namespace/NamespaceService.java  | 47 +-
 .../extensions/ExtensibleLoadManagerImplTest.java  | 43 
 3 files changed, 94 insertions(+), 35 deletions(-)



(pulsar-client-python) annotated tag v3.5.0 updated (38737a2 -> f33bdc7)

2024-04-13 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to annotated tag v3.5.0
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git


*** WARNING: tag v3.5.0 was modified! ***

from 38737a2  (commit)
  to f33bdc7  (tag)
 tagging 38737a24f6ba77fe4efc5321980513ae317920e4 (commit)
 replaces v3.5.0-candidate-2
  by Yunze Xu
  on Sat Apr 13 23:25:09 2024 +0800

- Log -
Release v3.5.0
-BEGIN PGP SIGNATURE-

iQJDBAABCgAtFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmYao9UPHHh5ekBhcGFj
aGUub3JnAAoJEEK7avts0m+mXoAP/2AwepUZ8Oj1ION19zAdvObCcDpcX/1eNIXs
Pne85Hq3RzjGoHYms7T4hKWdh5/MNL4VWJ3vZfkAFMf7evx0SQT1j1BK5cVECyfk
oPOiRxhJGEctdTUYtcDw5IPAy4g1dkmg9A01CdrpKfuPdLkiRuySqhMo9zkxRhrN
29iNjCjvoFS3eUCQpNCkSkpzpjvUtREtlb/jZV1tIjxONAHb7nrWevL9PQbcLu+7
IOBnYyf6ucNaM9hVUOX3KmPOMUvpbzdVRV5SkkKsYQNAppUiiTYUJ4YEiO2D0z35
N9CRV2A/XbDCwCQxZm024Ew9OLYlc0V8w01uvucSF9NlxKwkdgh3IkFUCs2UNx/N
8B0nuh+r/gVmbF9SXFY2BJhliH2nERG1K4lKy6z7KMNP8qrORTRZ6bqoblr2EJBi
NVEqnSRMuH0g8xmI62+4rulJi+eRwE98JCUVuTPhYmpxzBScYl8eW7U9TDHgIIBB
D/JXjceMPGBwqkaKKxGJY+PhjCDzeCbARm5H5u3N75/pmxO1Fqd9sNP0+t2sP3tK
+1ZTuWF3Kis7iuH+c6HtObgNldN4MhA0JxwhKtXFKZHzgEFJ85NdfmYeAwuasO5l
hWuHR1MkBet3fr50m1/n7cSj3reQDfgl3aW7tBNtyqVVWXA4J37SWtEA9SnSieNN
wJggIew1
=HRoa
-END PGP SIGNATURE-
---


No new revisions were added by this update.

Summary of changes:



(pulsar-client-python) branch v3.5.0 deleted (was 38737a2)

2024-04-13 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch v3.5.0
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git


 was 38737a2  Merge branch 'main' into branch-3.5

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(pulsar-client-python) branch v3.5.0 created (now 38737a2)

2024-04-13 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch v3.5.0
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git


  at 38737a2  Merge branch 'main' into branch-3.5

No new revisions were added by this update.



svn commit: r68476 - /dev/pulsar/pulsar-client-python-3.5.0-candidate-3/ /release/pulsar/pulsar-client-python-3.5.0/

2024-04-13 Thread xyz
Author: xyz
Date: Sat Apr 13 15:08:33 2024
New Revision: 68476

Log:
Release Apache Pulsar Client Python 3.5.0

Added:
release/pulsar/pulsar-client-python-3.5.0/
  - copied from r68475, dev/pulsar/pulsar-client-python-3.5.0-candidate-3/
Removed:
dev/pulsar/pulsar-client-python-3.5.0-candidate-3/



(pulsar) branch master updated (7984cc2f93f -> dbe1a4816c1)

2024-04-12 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


from 7984cc2f93f [feat][admin] Enable Gzip Compression by Default in Admin 
Client (#22464)
 add dbe1a4816c1 [improve][broker] Reduce the duplicated null check for 
LeaderElectionService (#22465)

No new revisions were added by this update.

Summary of changes:
 .../pulsar/broker/namespace/NamespaceService.java   | 17 +++--
 1 file changed, 3 insertions(+), 14 deletions(-)



(pulsar-client-go) branch master updated: [improve] Update topic admin interface comment, add topic admin test cases (#1202)

2024-04-11 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-go.git


The following commit(s) were added to refs/heads/master by this push:
 new 10819739 [improve] Update topic admin interface comment, add topic 
admin test cases (#1202)
10819739 is described below

commit 10819739d8c0f66bf97745ba0bdf5630e09f58d4
Author: zhou zhuohan <843520...@qq.com>
AuthorDate: Fri Apr 12 13:08:54 2024 +0800

[improve] Update topic admin interface comment, add topic admin test cases 
(#1202)
---
 integration-tests/conf/standalone.conf |   3 +
 pulsaradmin/pkg/admin/topic.go | 179 ++
 pulsaradmin/pkg/admin/topic_test.go| 227 +
 3 files changed, 384 insertions(+), 25 deletions(-)

diff --git a/integration-tests/conf/standalone.conf 
b/integration-tests/conf/standalone.conf
index c816c8fd..ccb91f37 100644
--- a/integration-tests/conf/standalone.conf
+++ b/integration-tests/conf/standalone.conf
@@ -83,6 +83,9 @@ maxUnackedMessagesPerConsumer=5
 # Set maxMessageSize to 1MB rather than the default value 5MB for testing
 maxMessageSize=1048576
 
+# enable topic level policies to test topic admin functions
+topicLevelPoliciesEnabled=true
+
 ### --- Authentication --- ###
 
 # Enable TLS
diff --git a/pulsaradmin/pkg/admin/topic.go b/pulsaradmin/pkg/admin/topic.go
index e6057413..7badc634 100644
--- a/pulsaradmin/pkg/admin/topic.go
+++ b/pulsaradmin/pkg/admin/topic.go
@@ -26,16 +26,35 @@ import (
 
 // Topics is admin interface for topics management
 type Topics interface {
-   // Create a topic
-   Create(utils.TopicName, int) error
-
-   // Delete a topic
-   Delete(utils.TopicName, bool, bool) error
+   // Create a partitioned or non-partitioned topic
+   //
+   // @param topic
+   //topicName struct
+   // @param partitions
+   //number of topic partitions,
+   //when setting to 0, it will create a non-partitioned topic
+   Create(topic utils.TopicName, partitions int) error
+
+   // Delete a topic, this function can delete both partitioned or 
non-partitioned topic
+   //
+   // @param topic
+   //topicName struct
+   // @param force
+   //delete topic forcefully
+   // @param nonPartitioned
+   //when set to true, topic will be treated as a non-partitioned 
topic
+   //Otherwise it will be treated as a partitioned topic
+   Delete(topic utils.TopicName, force bool, nonPartitioned bool) error
 
// Update number of partitions of a non-global partitioned topic
// It requires partitioned-topic to be already exist and number of new 
partitions must be greater than existing
// number of partitions. Decrementing number of partitions requires 
deletion of topic which is not supported.
-   Update(utils.TopicName, int) error
+   //
+   // @param topic
+   //topicName struct
+   // @param partitions
+   //number of new partitions of already exist partitioned-topic
+   Update(topic utils.TopicName, partitions int) error
 
// GetMetadata returns metadata of a partitioned topic
GetMetadata(utils.TopicName) (utils.PartitionedTopicMetadata, error)
@@ -52,12 +71,24 @@ type Topics interface {
GetPermissions(utils.TopicName) (map[string][]utils.AuthAction, error)
 
// GrantPermission grants a new permission to a client role on a single 
topic
-   GrantPermission(utils.TopicName, string, []utils.AuthAction) error
+   //
+   // @param topic
+   //topicName struct
+   // @param role
+   //client role to which grant permission
+   // @param action
+   //auth actions (e.g. produce and consume)
+   GrantPermission(topic utils.TopicName, role string, action 
[]utils.AuthAction) error
 
// RevokePermission revokes permissions to a client role on a single 
topic. If the permission
// was not set at the topic level, but rather at the namespace level, 
this operation will
// return an error (HTTP status code 412).
-   RevokePermission(utils.TopicName, string) error
+   //
+   // @param topic
+   //topicName struct
+   // @param role
+   //client role to which remove permissions
+   RevokePermission(topic utils.TopicName, role string) error
 
// Lookup a topic returns the broker URL that serves the topic
Lookup(utils.TopicName) (utils.LookupData, error)
@@ -69,24 +100,56 @@ type Topics interface {
GetLastMessageID(utils.TopicName) (utils.MessageID, error)
 
// GetMessageID returns the message Id by timestamp(ms) of a topic
-   GetMessageID(utils.TopicName, int64) (utils.MessageID, error)
-
-   // GetStats returns the stats for the topic
-   // All the

(pulsar) branch master updated (2469b97b7e4 -> a51bbdd1480)

2024-04-07 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


from 2469b97b7e4 [fix][client] Fix client side memory leak when call 
MessageImpl.create and fix imprecise client-side metrics: 
pendingMessagesUpDownCounter, pendingBytesUpDownCounter, latencyHistogram 
(#22393)
 add a51bbdd1480 [improve][broker] Deprecate unused 
enableNamespaceIsolationUpdateOnTime config (#22449)

No new revisions were added by this update.

Summary of changes:
 .../src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java | 5 ++---
 .../src/test/java/org/apache/pulsar/broker/admin/AdminApi2Test.java  | 3 ++-
 2 files changed, 4 insertions(+), 4 deletions(-)



(pulsar-client-cpp) branch main updated: fix: Incorrect acknowledgment behavior in the listener of the multi-topic consumer. (#423)

2024-04-06 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


The following commit(s) were added to refs/heads/main by this push:
 new 3f0b33b  fix: Incorrect acknowledgment behavior in the listener of the 
multi-topic consumer. (#423)
3f0b33b is described below

commit 3f0b33bfad746fd2da63fe062ea745d9a9caed55
Author: Baodi Shi 
AuthorDate: Sat Apr 6 18:23:09 2024 +0800

fix: Incorrect acknowledgment behavior in the listener of the multi-topic 
consumer. (#423)

### Motivation
https://github.com/apache/pulsar-client-node/issues/371

### Modifications
- Add the message to the unacknowledged tracker before call the listener.

### Verifying this change
- Add `testMultiConsumerListenerAndAck` to cover it.
---
 lib/MultiTopicsConsumerImpl.cc |  2 +-
 lib/MultiTopicsConsumerImpl.h  |  1 +
 lib/UnAckedMessageTrackerEnabled.h |  1 +
 tests/ConsumerTest.cc  | 42 ++
 4 files changed, 45 insertions(+), 1 deletion(-)

diff --git a/lib/MultiTopicsConsumerImpl.cc b/lib/MultiTopicsConsumerImpl.cc
index 1484785..80566c8 100644
--- a/lib/MultiTopicsConsumerImpl.cc
+++ b/lib/MultiTopicsConsumerImpl.cc
@@ -568,8 +568,8 @@ void MultiTopicsConsumerImpl::internalListener(Consumer 
consumer) {
 incomingMessages_.pop(m);
 try {
 Consumer self{get_shared_this_ptr()};
-messageListener_(self, m);
 messageProcessed(m);
+messageListener_(self, m);
 } catch (const std::exception& e) {
 LOG_ERROR("Exception thrown from listener of Partitioned Consumer" << 
e.what());
 }
diff --git a/lib/MultiTopicsConsumerImpl.h b/lib/MultiTopicsConsumerImpl.h
index 9d71a04..b5c51ec 100644
--- a/lib/MultiTopicsConsumerImpl.h
+++ b/lib/MultiTopicsConsumerImpl.h
@@ -183,6 +183,7 @@ class MultiTopicsConsumerImpl : public ConsumerImplBase {
 FRIEND_TEST(ConsumerTest, testPartitionedConsumerUnAckedMessageRedelivery);
 FRIEND_TEST(ConsumerTest, testAcknowledgeCumulativeWithPartition);
 FRIEND_TEST(ConsumerTest, testPatternSubscribeTopic);
+FRIEND_TEST(ConsumerTest, testMultiConsumerListenerAndAck);
 };
 
 typedef std::shared_ptr MultiTopicsConsumerImplPtr;
diff --git a/lib/UnAckedMessageTrackerEnabled.h 
b/lib/UnAckedMessageTrackerEnabled.h
index 83edc4c..c5479a7 100644
--- a/lib/UnAckedMessageTrackerEnabled.h
+++ b/lib/UnAckedMessageTrackerEnabled.h
@@ -67,6 +67,7 @@ class UnAckedMessageTrackerEnabled : public 
std::enable_shared_from_this(multiConsumerImplPtr->unAckedMessageTrackerPtr_.get());
+ASSERT_EQ(0, tracker->size());
+
+client.close();
+}
+
 }  // namespace pulsar



svn commit: r68255 [1/2] - in /dev/pulsar/pulsar-client-python-3.5.0-candidate-3: ./ linux-glibc-arm64/ linux-glibc-x86_64/ linux-musl-arm64/ linux-musl-x86_64/ macos/ windows/

2024-04-02 Thread xyz
Author: xyz
Date: Tue Apr  2 09:45:38 2024
New Revision: 68255

Log:
Staging artifacts and signature for Python client 3.5.0-candidate-3

Added:
dev/pulsar/pulsar-client-python-3.5.0-candidate-3/
dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-arm64/

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-arm64/pulsar_client-3.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-arm64/pulsar_client-3.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-arm64/pulsar_client-3.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-arm64/pulsar_client-3.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-arm64/pulsar_client-3.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-arm64/pulsar_client-3.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-arm64/pulsar_client-3.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-arm64/pulsar_client-3.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-arm64/pulsar_client-3.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-arm64/pulsar_client-3.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-arm64/pulsar_client-3.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-arm64/pulsar_client-3.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-arm64/pulsar_client-3.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-arm64/pulsar_client-3.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-arm64/pulsar_client-3.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.sha512
dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-x86_64/

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-x86_64/pulsar_client-3.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-x86_64/pulsar_client-3.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-x86_64/pulsar_client-3.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-x86_64/pulsar_client-3.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-x86_64/pulsar_client-3.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-x86_64/pulsar_client-3.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-x86_64/pulsar_client-3.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-x86_64/pulsar_client-3.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-x86_64/pulsar_client-3.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-x86_64/pulsar_client-3.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-x86_64/pulsar_client-3.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-x86_64/pulsar_client-3.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-x86_64/pulsar_client-3.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-3/linux-glibc-x86_64/pulsar_client-3.5.0-cp39-cp39

svn commit: r68255 [2/2] - in /dev/pulsar/pulsar-client-python-3.5.0-candidate-3: ./ linux-glibc-arm64/ linux-glibc-x86_64/ linux-musl-arm64/ linux-musl-x86_64/ macos/ windows/

2024-04-02 Thread xyz
Added: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-3/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl
==
Binary file - no diff available.

Propchange: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-3/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl
--
svn:mime-type = application/octet-stream

Added: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-3/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl.asc
==
--- 
dev/pulsar/pulsar-client-python-3.5.0-candidate-3/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl.asc
 (added)
+++ 
dev/pulsar/pulsar-client-python-3.5.0-candidate-3/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl.asc
 Tue Apr  2 09:45:38 2024
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCgAdFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmYL018ACgkQQrtq+2zS
+b6bq7BAAuwwui9WGTnazkLQ/E2QFQprGHTbITFOgvPWPuB3e09oTz4Ytpd4JdkNm
+btay2Qi6y0mah69TNi/vlei1PIRbnQFTe5yVqciScIUpVpQyEL30zFd/R4OTwokG
+SPzdrFGdxQjUpQ32P0YpwlCUaT+acJveO0E9QGLmNmBCd7E7jkFaqewHaU8ckAin
+76oaddg5hflRTAQ9DoMNAGB8cJZbIQEDKKPGz0yCNPUDt1kTzbAv8zKSXYg0XS3L
+SAVHJqTSrkmIDb4GY2vR1KIQokd9ZnoP/mgpMQaSUSop1pWpKP+b8S7TtV0gO0uU
+F0fwykGuw3OHrfGdrvPO1JcBEamvS4z9dmtRWu9hkQNIQrQ+AfQhfeDJakabpi8f
+50z+IoI4P3FlEo6o6bEHsXgKMKwirPvZggxH7iQ1pfdFxY+bQ07UxQv0Z8GzxLhx
+d8nmqnPS1J3g3nM8JnT8v+756dBx7/1EZfoUfgrNgw6unQCMUsn6eqa1U+YdmTvN
+lfDsa8uyz1fZJqrccNCNg1eYqgh4CnyekfF7zrM7HMMkNiCv0s+JoHT0dIYqQ+Nv
+JVTjOuTtRzkj7FdA3FXFafFpXzyZyXktrjVEV5KaLOd0xwZSX22l5idBQ3itcMU+
+VahqjvpjTC/fvQ2fQs/8yOWPBs2Gaw8G6M9mJJQ0QJeuU4CzrSw=
+=SbBQ
+-END PGP SIGNATURE-

Added: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-3/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl.sha512
==
--- 
dev/pulsar/pulsar-client-python-3.5.0-candidate-3/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl.sha512
 (added)
+++ 
dev/pulsar/pulsar-client-python-3.5.0-candidate-3/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl.sha512
 Tue Apr  2 09:45:38 2024
@@ -0,0 +1 @@
+c6ddf211d48a745ece27c82b18b05c393ee8b4c6d28b09551b1552d5ae49e4802c74e08346a2ea440615bd86d72aa313fe68e27b45a65522f42dd3618135743e
  pulsar_client-3.5.0-cp38-cp38-win_amd64.whl

Added: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-3/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl
==
Binary file - no diff available.

Propchange: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-3/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl
--
svn:mime-type = application/octet-stream

Added: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-3/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl.asc
==
--- 
dev/pulsar/pulsar-client-python-3.5.0-candidate-3/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl.asc
 (added)
+++ 
dev/pulsar/pulsar-client-python-3.5.0-candidate-3/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl.asc
 Tue Apr  2 09:45:38 2024
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCgAdFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmYL02AACgkQQrtq+2zS
+b6bpZw/+IKjjS8Scaw9pFrKUP1osOwlr1TFSGaKXkG0q022qcc6LOLBxurJR6G97
+Ej/SrQxgwv6ZdIv7EIuaQNeeiShtrM+0O28RNhJDrTctkofhM4eoBygbHTdVTK7b
+AC/DGI3gArvoAOetLQq6k3O9dpl3jmY69GtasuR7/uot2wzQ2YEEp8uh1o3AxEeK
+47/bUVhnzu0oblF6UCpWXHJNwi32aJs5wRKUc1qP+TcJnkHclm70+cweDwkoGUkU
+AHBC+Q3WXCC1BBa8yhoAO/kklFt8ZKCvBiOT9pC1QgZLRSyR2DWZiPXUg2QzhCKP
+ZRQozbWtVzozyafaqi5wInVDSH/xtrJAIYJgvXsp5abhdPnACBlxONe9KCXBApZE
+1GhfG9A/q1j6fQzmJUhY2g4xPigMOitr1xQ8Zv/owyV0MuTJkLaW51rGuXZdqfKY
+0icoD6Kf6cNTmd3yJu4Jo2TByMN8FLHW4gIBf/ezsw6pj4e5cezHzVkivMLzTgh6
+YDhcpI3KxsOtzhNC+vlOhOAlLqoVnwxLkYp8IgC1VBAkaBcJti6WVoM4wqDhqBya
+a5w36SdmEYJRQpNgHlL8NDNcfWpuNGz9cL2GJ4gD/NxSUd1//xo8SLCbnSFpeUqW
+cspB4jsJ/L9XUjEQd7rkCXNXY9d091TqsG0IqR7uhNiBSeH1B6g=
+=Tu80
+-END PGP SIGNATURE-

Added: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-3/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl.sha512
==
--- 
dev/pulsar/pulsar-client-python-3.5.0-candidate-3/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl.sha512
 (added)
+++ 
dev/pulsar/pulsar-client-python-3.5.0-candidate-3/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl.sha512
 Tue Apr  2 09:45:38 2024
@@ -0,0 +1 @@
+76f5df55cd94fbe845272bf84d28e358e454e0c98da6fdfc2fee94c3b4d0683222bddb4268b7f7eb88ff9335078e38c5b040659601a43b5594d135d4eb031b70
  pulsar_client-3.5.0-cp39-cp39-win_amd64.whl




(pulsar-client-python) annotated tag v3.5.0-candidate-3 updated (38737a2 -> e0b790d)

2024-04-02 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to annotated tag v3.5.0-candidate-3
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git


*** WARNING: tag v3.5.0-candidate-3 was modified! ***

from 38737a2  (commit)
  to e0b790d  (tag)
 tagging 38737a24f6ba77fe4efc5321980513ae317920e4 (commit)
 replaces v3.5.0-candidate-2
  by Yunze Xu
  on Tue Apr 2 14:41:15 2024 +0800

- Log -
Release v3.5.0 candidate 3
-BEGIN PGP SIGNATURE-

iQJDBAABCgAtFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmYLqIsPHHh5ekBhcGFj
aGUub3JnAAoJEEK7avts0m+mWUAP/23/aPBNXhnTHI3WwSvK2r5h/5vc5SsWAWfq
Bg1YHNT2vaAdY8GwZRjRO0atfrtF+6uGUvDsMIP96GznUg8KvJElutzoixzoeeJV
i9w1gKnxyyztTYKHiyWsaN+1QQLQrORJx/9x1JnxsywsmPzgORah6PdxgYgUdGXU
PKg4gow6ky0VzQNU4Mob09y5vd7jQjyAeWavXIEuuPimmaS9wu0qL9PKvfqu0utk
sUGPy8xNI+DB/5stdrH7gPwj3niZOClT4gV9G+OfUgSKPvD7dRF3FYwc4fHxL9nu
eIbb1KQckDcpOMIxd1BhifV06+/FfHNEuqEvxzsMFd87xcrqBIFDX2R5BNMorha3
pJcnTsrAkkb7H1YUdY/8SpoZ5iBY1J2zN3stBH1ZVPc0L5Ae9Yzcv80+ASEvqRol
c1nTzfSrWEc5voXCqdOsE6kOYRJ00TqpMTLppOxXPohHplojHJ0mme+8bcIptTUy
idjiNC4U+THSRk4yzSwyWI6WXKyO4RkMgpIfwKqqsRTfIWmvdIGFtQLHDasTlfwm
xWdrpk8TX5H8Ra1LB/Uk/1ili4o8esJ69M52FttFlmCDBrwSsHPeUGf5YEMhmhTH
J4rsNV/ZtwMm6XLwLKtyc4q5QBcXWj2Fhd4YA4tYavKC1/f85KD5Ik7rmJZ0IXfA
FpvQUwmg
=V+VK
-END PGP SIGNATURE-
---


No new revisions were added by this update.

Summary of changes:



svn commit: r68245 - /dev/pulsar/pulsar-client-python-3.5.0-candidate-2/

2024-04-02 Thread xyz
Author: xyz
Date: Tue Apr  2 06:39:08 2024
New Revision: 68245

Log:
Remove pulsar-client-python 3.5.0 candidate 2

Removed:
dev/pulsar/pulsar-client-python-3.5.0-candidate-2/



(pulsar-client-python) branch branch-3.5 updated (730c2d7 -> 38737a2)

2024-04-02 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git


from 730c2d7  Merge branch 'main' into branch-3.5
 add eb2a7d4  Upgrade the C++ client to 3.5.1 (#209)
 new 38737a2  Merge branch 'main' into branch-3.5

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 dependencies.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



(pulsar-client-python) 01/01: Merge branch 'main' into branch-3.5

2024-04-02 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git

commit 38737a24f6ba77fe4efc5321980513ae317920e4
Merge: 730c2d7 eb2a7d4
Author: Yunze Xu 
AuthorDate: Tue Apr 2 14:38:10 2024 +0800

Merge branch 'main' into branch-3.5

 dependencies.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



(pulsar-client-node) branch master updated: Bump cpp client version to 3.5.1 (#370)

2024-04-01 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-node.git


The following commit(s) were added to refs/heads/master by this push:
 new 5b42bfd  Bump cpp client version to 3.5.1 (#370)
5b42bfd is described below

commit 5b42bfdd4816c77401994658b4219adea4b9f624
Author: Yunze Xu 
AuthorDate: Tue Apr 2 12:14:37 2024 +0800

Bump cpp client version to 3.5.1 (#370)
---
 pulsar-client-cpp.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pulsar-client-cpp.txt b/pulsar-client-cpp.txt
index 4433d6e..ff9d49d 100644
--- a/pulsar-client-cpp.txt
+++ b/pulsar-client-cpp.txt
@@ -1,2 +1,2 @@
-CPP_CLIENT_BASE_URL=https://archive.apache.org/dist/pulsar/pulsar-client-cpp-3.4.2
-CPP_CLIENT_VERSION=3.4.2
+CPP_CLIENT_BASE_URL=https://archive.apache.org/dist/pulsar/pulsar-client-cpp-3.5.1
+CPP_CLIENT_VERSION=3.5.1



(pulsar-site) branch bewaremypower/release-note-cpp-3.5.1 deleted (was 88c9878fee3a)

2024-04-01 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch bewaremypower/release-note-cpp-3.5.1
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


 was 88c9878fee3a Add the release note for C++ client 3.5.1

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(pulsar-site) branch bewaremypower/release-note-cpp-3.5.1 created (now 88c9878fee3a)

2024-04-01 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch bewaremypower/release-note-cpp-3.5.1
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


  at 88c9878fee3a Add the release note for C++ client 3.5.1

This branch includes the following new commits:

 new 88c9878fee3a Add the release note for C++ client 3.5.1

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




(pulsar-site) 01/01: Add the release note for C++ client 3.5.1

2024-04-01 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch bewaremypower/release-note-cpp-3.5.1
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git

commit 88c9878fee3a89b0dd7e23a7c26b18e415fcb160
Author: Yunze Xu 
AuthorDate: Mon Apr 1 21:22:02 2024 +0800

Add the release note for C++ client 3.5.1
---
 data/release-cpp.js |  3 ++-
 release-notes/versioned/client-cpp-3.5.1.md | 13 +
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/data/release-cpp.js b/data/release-cpp.js
index 256e20ac0e2b..98fa1e3ed2ff 100644
--- a/data/release-cpp.js
+++ b/data/release-cpp.js
@@ -1,5 +1,6 @@
 module.exports = [
-{tagName: 
"v3.5.0",vtag:"3.5.x",releaseNotes:"/release-notes/versioned/client-cpp-3.5.0/",doc:"/docs/client-libraries-cpp",version:"v3.5.x"},
+{tagName: 
"v3.5.1",vtag:"3.5.x",releaseNotes:"/release-notes/versioned/client-cpp-3.5.1/",doc:"/docs/client-libraries-cpp",version:"v3.5.x"},
+{tagName: 
"v3.5.0",vtag:"3.5.x",releaseNotes:"/release-notes/versioned/client-cpp-3.5.0/",doc:"/docs/client-libraries-cpp"},
 {tagName: 
"v3.4.2",vtag:"3.4.x",releaseNotes:"/release-notes/versioned/client-cpp-3.4.2/",doc:"/docs/client-libraries-cpp",version:"v3.4.x"},
 {tagName: 
"v3.4.1",vtag:"3.4.x",releaseNotes:"/release-notes/versioned/client-cpp-3.4.1/",doc:"/docs/client-libraries-cpp",version:""},
 {tagName: 
"v3.4.0",vtag:"3.4.x",releaseNotes:"/release-notes/versioned/client-cpp-3.4.0/",doc:"/docs/client-libraries-cpp",version:""},
diff --git a/release-notes/versioned/client-cpp-3.5.1.md 
b/release-notes/versioned/client-cpp-3.5.1.md
new file mode 100644
index ..7f08d6677489
--- /dev/null
+++ b/release-notes/versioned/client-cpp-3.5.1.md
@@ -0,0 +1,13 @@
+---
+id: client-cpp-3.5.1
+title: Client CPP 3.5.1
+sidebar_label: Client CPP 3.5.1
+---
+
+## What's Changed
+* Fix wrong results of hasMessageAvailable and readNext after seeking by 
timestamp by @BewareMyPower in 
https://github.com/apache/pulsar-client-cpp/pull/422
+* Fix minor issues reported by CodeQL by @merlimat in 
https://github.com/apache/pulsar-client-cpp/pull/421
+* Support customize vcpkg directory when INTEGRATE_VCPKG is ON by 
@BewareMyPower in https://github.com/apache/pulsar-client-cpp/pull/417
+* Fix broken wireshark build workflow on macOS  by @BewareMyPower in 
https://github.com/apache/pulsar-client-cpp/pull/414
+
+**Full Changelog**: 
https://github.com/apache/pulsar-client-cpp/compare/v3.5.0...v3.5.1



svn commit: r68223 - /dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/ /release/pulsar/pulsar-client-cpp-3.5.1/

2024-04-01 Thread xyz
Author: xyz
Date: Mon Apr  1 13:17:46 2024
New Revision: 68223

Log:
Release Apache Pulsar Client C++ 3.5.1

Added:
release/pulsar/pulsar-client-cpp-3.5.1/
  - copied from r68222, 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/
Removed:
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/



(pulsar-client-cpp) annotated tag v3.5.1 updated (0ba3d7d -> 44b7d45)

2024-04-01 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to annotated tag v3.5.1
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


*** WARNING: tag v3.5.1 was modified! ***

from 0ba3d7d  (commit)
  to 44b7d45  (tag)
 tagging 0ba3d7d8e9f7d3fb2f2cc3cdf918bb63c4791afc (commit)
 replaces v3.5.0
  by Yunze Xu
  on Mon Apr 1 21:11:38 2024 +0800

- Log -
Release v3.5.1
-BEGIN PGP SIGNATURE-

iQJDBAABCgAtFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmYKsosPHHh5ekBhcGFj
aGUub3JnAAoJEEK7avts0m+mE7kP/0xBzWp3ELg5XQsYpVYgStZJ8BovVG5j4HXb
n62yd+/45ozMPi0Er5H+Q+nUjZeWWABtGdGgJ9szaMw3mmYzuiY8sIeFQFM05kOC
phtOK6nmxzNGF2IJrloYQizpbq1HMT9tc/Ho+YjAXpkks1JvT9LdFckmmrBPivWO
M7Sff6iZ6tkzOVo7m+P0IiSZMIZTYHe79EKaZHIAWCsNHUTTNx8piVRkvR5xL+IR
3DfKwtA21nrc26ngK8PpZo6Fp/Nl4JheWpkj5tLfDAwou/2iIreNY0cvFPxfgzHg
MG9JEE2sLjBmErwh9+fNZwLMHpM0DvrmOATKlUI0t2H22CWcGWatODcCFtnDoTAc
O+/7riAocAvkxRqi0ADF4ACRNnoYH1dmZijXfw1HN/vBDLPXJGrMDXxwhyT5CM8I
nwphMRd5WiMvk9wOWEekM1w3HcDd5hrSzdQTzfE0BJu9eBBM6tMw4cg2Xw8q3Adv
VzeKnLcwmL0XKwnyZhudDG3d7vr1DBdQTRDy7pHuAI4ucwMDqSuCi55EsmPN0zI6
7Cf3yx7kpXuWr27HPZ24xNJtEbGk/eM/t1rS7rVmtb+fEmeUaKLdHKlbqrlbkHSg
ZEoOi+svM0Axgh7Qgf/h4bPfbBSswoqRJ/pNDXyTcqUdd4K00apCenxpDoEE0tN6
2tlzvRyP
=ADvS
-END PGP SIGNATURE-
---


No new revisions were added by this update.

Summary of changes:



svn commit: r68167 [1/2] - in /dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1: ./ apk-arm64/ apk-arm64/aarch64/ apk-x86_64/ apk-x86_64/x86_64/ deb-arm64/ deb-x86_64/ rpm-arm64/ rpm-a

2024-03-28 Thread xyz
Author: xyz
Date: Thu Mar 28 07:26:10 2024
New Revision: 68167

Log:
Staging artifacts and signature for Pulsar Client C++ release 3.5.1 candidate 1

Added:
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apache-pulsar-client-cpp-3.5.1.tar.gz
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apache-pulsar-client-cpp-3.5.1.tar.gz.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apache-pulsar-client-cpp-3.5.1.tar.gz.sha512
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-arm64/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-arm64/aarch64/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-arm64/aarch64/APKINDEX.tar.gz
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-arm64/aarch64/APKINDEX.tar.gz.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-arm64/aarch64/APKINDEX.tar.gz.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-arm64/aarch64/apache-pulsar-client-3.5.1-r0.apk
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-arm64/aarch64/apache-pulsar-client-3.5.1-r0.apk.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-arm64/aarch64/apache-pulsar-client-3.5.1-r0.apk.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-arm64/aarch64/apache-pulsar-client-dev-3.5.1-r0.apk
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-arm64/aarch64/apache-pulsar-client-dev-3.5.1-r0.apk.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-arm64/aarch64/apache-pulsar-client-dev-3.5.1-r0.apk.sha512
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-x86_64/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-x86_64/x86_64/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-x86_64/x86_64/APKINDEX.tar.gz
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-x86_64/x86_64/APKINDEX.tar.gz.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-x86_64/x86_64/APKINDEX.tar.gz.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-x86_64/x86_64/apache-pulsar-client-3.5.1-r0.apk
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-x86_64/x86_64/apache-pulsar-client-3.5.1-r0.apk.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-x86_64/x86_64/apache-pulsar-client-3.5.1-r0.apk.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-x86_64/x86_64/apache-pulsar-client-dev-3.5.1-r0.apk
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-x86_64/x86_64/apache-pulsar-client-dev-3.5.1-r0.apk.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/apk-x86_64/x86_64/apache-pulsar-client-dev-3.5.1-r0.apk.sha512
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/deb-arm64/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/deb-arm64/Packages.gz
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/deb-arm64/Packages.gz.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/deb-arm64/Packages.gz.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/deb-arm64/apache-pulsar-client-dev.deb
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/deb-arm64/apache-pulsar-client-dev.deb.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/deb-arm64/apache-pulsar-client-dev.deb.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/deb-arm64/apache-pulsar-client.deb
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/deb-arm64/apache-pulsar-client.deb.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/deb-arm64/apache-pulsar-client.deb.sha512
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/deb-x86_64/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/deb-x86_64/Packages.gz
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/deb-x86_64/Packages.gz.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/deb-x86_64/Packages.gz.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/deb-x86_64/apache-pulsar-client-dev.deb
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/deb-x86_64/apache-pulsar-client-dev.deb.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/deb-x86_64/apache-pulsar-client

svn commit: r68167 [2/2] - in /dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1: ./ apk-arm64/ apk-arm64/aarch64/ apk-x86_64/ apk-x86_64/x86_64/ deb-arm64/ deb-x86_64/ rpm-arm64/ rpm-a

2024-03-28 Thread xyz
Added: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-debuginfo-3.5.1-1.x86_64.rpm.sha512
==
--- 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-debuginfo-3.5.1-1.x86_64.rpm.sha512
 (added)
+++ 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-debuginfo-3.5.1-1.x86_64.rpm.sha512
 Thu Mar 28 07:26:10 2024
@@ -0,0 +1 @@
+ccbcca7303deec9ec3238992914dbb782f09fb23ea56d8b36c2a33aedd14be31ae6eb638c47cfdc5c1a0a611155c0153c4494eb0d9e6b7927e3d0519781fea11
  ./rpm-x86_64/x86_64/apache-pulsar-client-debuginfo-3.5.1-1.x86_64.rpm

Added: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.1-1.x86_64.rpm
==
Binary file - no diff available.

Propchange: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.1-1.x86_64.rpm
--
svn:mime-type = application/octet-stream

Added: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.1-1.x86_64.rpm.asc
==
--- 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.1-1.x86_64.rpm.asc
 (added)
+++ 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.1-1.x86_64.rpm.asc
 Thu Mar 28 07:26:10 2024
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCgAdFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmYFGt0ACgkQQrtq+2zS
+b6aTOg//f0mJwoSEvsaBDLVldah2Bv2yLiuhFZn/O/OEGEKGyDwxQOjwsuDHAmVY
+B9S9ljbxMzYLVrbdrzeliG/VxJd9/5MzCNab4CYulVijdznN+PpiwstJco6wf1pG
+J4is0brBOxwX3JaEsOI8+uaDlk535iPnX4NsWuwYVRF6V+Snzpgl3yEAZbdyWq+c
+q/7ajbNvddZp+tJ8mqk3Q3Dmjoa+0h50f6XXNuGGi7q7OKhYho25lzFCS4WOq216
+8Pp/Z6Vyk/zqIPHMUFvLcC/QFVk7kMNokJV0Mxlydlo5mKPsoWWKabeG/ev9iTdh
+CAa2Bl98ZyM/joy3fI/6BJ39m3Pqv/JZf7aLcqbkcV39LcfNyd+4KvK8VlGUWAPT
+DUlNKWZJhBLyGhXMgP5sZfkRUiYmJbjD8JmtOA5oVSXzWVGDyraR9rxe8bj51wrI
+Mk1RgvXyMTPtfw+0JNRdndAODq2NE1l6SPMoOXY7IcplJ8nSXBVAo41ax8OMdte+
+ekNyll9pXlVwi8b1p+Qm5/3GQFv5eVjrt7qdElBjccHK0fVe5nGyadXxHmtSlXRS
+oG5OuJoOuiQUT7qhGUrKLXgKihVtIa4IvmbCF8MOfhTOT4+Jv+6sK1mCRNLYZkJ4
+0SPxUlBcBwMwPfWcQ6xGnLCkqCswELVPhzmVdlBpKoZ+1lRHtpY=
+=Irjp
+-END PGP SIGNATURE-

Added: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.1-1.x86_64.rpm.sha512
==
--- 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.1-1.x86_64.rpm.sha512
 (added)
+++ 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.1-1.x86_64.rpm.sha512
 Thu Mar 28 07:26:10 2024
@@ -0,0 +1 @@
+583266a3ed38f9685b423d64d134ae0f8832e8e920377c21743bd14907801fc9bc36984c4b641d1fe5694cbd603135aa2afe0d14baf5633a789062f720fd91a1
  ./rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.1-1.x86_64.rpm

Added: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/rpm-x86_64/x86_64/repodata/2de6c4134e4ed04a2d4800b230e7b76bd548c8af06de02b46ab3125a654f88b5-filelists.xml.gz
==
Binary file - no diff available.

Propchange: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/rpm-x86_64/x86_64/repodata/2de6c4134e4ed04a2d4800b230e7b76bd548c8af06de02b46ab3125a654f88b5-filelists.xml.gz
--
svn:mime-type = application/octet-stream

Added: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/rpm-x86_64/x86_64/repodata/2de6c4134e4ed04a2d4800b230e7b76bd548c8af06de02b46ab3125a654f88b5-filelists.xml.gz.asc
==
--- 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/rpm-x86_64/x86_64/repodata/2de6c4134e4ed04a2d4800b230e7b76bd548c8af06de02b46ab3125a654f88b5-filelists.xml.gz.asc
 (added)
+++ 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.1-candidate-1/rpm-x86_64/x86_64/repodata/2de6c4134e4ed04a2d4800b230e7b76bd548c8af06de02b46ab3125a654f88b5-filelists.xml.gz.asc
 Thu Mar 28 07:26:10 2024
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCgAdFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmYFGtwACgkQQrtq+2zS
+b6ahjg//XLQdnRTk9gke72ImMgjIX0MPghfT/pB1gYysb9N7DRjpZiyKNu8LCUiA
+QJ/AKUpGYYtw/CndKCtehTGo33JVb8tMCRPVafgA0OfKYuGIVfSee+IEKDIs3kbc

(pulsar-client-cpp) annotated tag v3.5.1-candidate-1 updated (0ba3d7d -> ea2729a)

2024-03-27 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to annotated tag v3.5.1-candidate-1
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


*** WARNING: tag v3.5.1-candidate-1 was modified! ***

from 0ba3d7d  (commit)
  to ea2729a  (tag)
 tagging 0ba3d7d8e9f7d3fb2f2cc3cdf918bb63c4791afc (commit)
 replaces v3.5.0
  by Yunze Xu
  on Thu Mar 28 10:50:13 2024 +0800

- Log -
Release v3.5.1-candidate-1
-BEGIN PGP SIGNATURE-

iQJDBAABCgAtFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmYE2uYPHHh5ekBhcGFj
aGUub3JnAAoJEEK7avts0m+m36gP/1AjcqllVVeCx8cFtCSqRrOB5Uw+MZOk6UDY
1McU/ri08XdMEpv770ALUz8oWB1C0MTCuJzktsvFP+ju/QtMGvBilXLeMGxNsz6v
vPl4OV/a3O1axYDy8pRtC88E4xFB4wqXNfBdZ+lgIOfyrNvS9aYYhxBTrvyplDWb
DYfnQpBsA38wbMdA+S3OnQhxKjSzcvO1u6avhNmtZUF1poR85ddewxfNGAsCY1cR
qG/QW0hImIWP0fhpwMgalT5+3BfJKDDFG+m2xk2N5MA2Wc9Kb4/UEURLWzyL0lGH
scLZ9HujYPsbsXv89St0qB0ZNI+J9lFlxnzWd/0gWnK1KcX2mKr5evXAQ0lBYRgS
I0LIw3H4cXoWRGOxbrd/jxW1p5tKYvrsZsXhDHgwct6W0YNwFDSrfiWLM0v6kwKA
x8vJUlQnUF0/CXg5Shf8m0BbpL2TQA6AwburHYTshB0jKEtSbmMRJAdrlD1gRc8Y
qIE5V+tQnFTEvL948WxugcyMOhXpOKGu3Z1EnDOedAohDR9Zhds34+M322TGZgdt
G+N97geORkkBdS5pTEvdtg/4lEgasBddphCS2EFPvK1q5kNO/6Oc+oLKmzpoGe9B
9Z1i6ll6cYApsdkHRzrSzuspdtc/gC7NuA+zqb977jJkeDjn21d8Hvm+XtFdXX7t
M2wbz/mq
=oWoD
-END PGP SIGNATURE-
---


No new revisions were added by this update.

Summary of changes:



(pulsar-client-cpp) branch branch-3.5 updated (916af95 -> 0ba3d7d)

2024-03-27 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


from 916af95  Merge branch 'main' into branch-3.5
 new e7793d6  Support customize vcpkg directory when INTEGRATE_VCPKG is ON 
(#417)
 new 0e0ca8d  Fix broken wireshark build workflow on macOS (#414)
 new 7cfd775  Fix minor issues reported by CodeQL (#421)
 new b2ad352  Fix wrong results of hasMessageAvailable and readNext after 
seeking by timestamp (#422)
 new 0ba3d7d  Release 3.5.1

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/ci-pr-validation.yaml | 10 
 CMakeLists.txt  |  4 +-
 README.md   | 13 +
 lib/ConsumerImpl.cc | 41 +---
 lib/ConsumerImpl.h  | 15 +-
 lib/lz4/lz4.cc  |  6 +--
 perf/PerfProducer.cc|  2 +-
 tests/ReaderTest.cc | 84 ++---
 version.txt |  2 +-
 9 files changed, 135 insertions(+), 42 deletions(-)



(pulsar-client-cpp) 04/05: Fix wrong results of hasMessageAvailable and readNext after seeking by timestamp (#422)

2024-03-27 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git

commit b2ad3525eb762de5b92cc2af92cbe2e02c3e90cd
Author: Yunze Xu 
AuthorDate: Thu Mar 28 10:36:12 2024 +0800

Fix wrong results of hasMessageAvailable and readNext after seeking by 
timestamp (#422)

Fixes https://github.com/apache/pulsar-client-cpp/issues/420

It's a catch-up for https://github.com/apache/pulsar/pull/22363

(cherry picked from commit 27d8cc01d5b7cfce94a7d71259dca5cea83ae01e)
---
 lib/ConsumerImpl.cc | 41 ++
 lib/ConsumerImpl.h  | 15 +-
 tests/ReaderTest.cc | 84 ++---
 3 files changed, 104 insertions(+), 36 deletions(-)

diff --git a/lib/ConsumerImpl.cc b/lib/ConsumerImpl.cc
index ebc8518..1a0b0cb 100644
--- a/lib/ConsumerImpl.cc
+++ b/lib/ConsumerImpl.cc
@@ -1050,7 +1050,9 @@ void ConsumerImpl::messageProcessed(Message& msg, bool 
track) {
  */
 void ConsumerImpl::clearReceiveQueue() {
 if (duringSeek()) {
-startMessageId_ = seekMessageId_.get();
+if (!hasSoughtByTimestamp_.load(std::memory_order_acquire)) {
+startMessageId_ = seekMessageId_.get();
+}
 SeekStatus expected = SeekStatus::COMPLETED;
 if (seekStatus_.compare_exchange_strong(expected, 
SeekStatus::NOT_STARTED)) {
 auto seekCallback = seekCallback_.release();
@@ -1476,7 +1478,7 @@ void ConsumerImpl::seekAsync(const MessageId& msgId, 
ResultCallback callback) {
 return;
 }
 const auto requestId = client->newRequestId();
-seekAsyncInternal(requestId, Commands::newSeek(consumerId_, requestId, 
msgId), msgId, 0L, callback);
+seekAsyncInternal(requestId, Commands::newSeek(consumerId_, requestId, 
msgId), SeekArg{msgId}, callback);
 }
 
 void ConsumerImpl::seekAsync(uint64_t timestamp, ResultCallback callback) {
@@ -1495,8 +1497,8 @@ void ConsumerImpl::seekAsync(uint64_t timestamp, 
ResultCallback callback) {
 return;
 }
 const auto requestId = client->newRequestId();
-seekAsyncInternal(requestId, Commands::newSeek(consumerId_, requestId, 
timestamp), MessageId::earliest(),
-  timestamp, callback);
+seekAsyncInternal(requestId, Commands::newSeek(consumerId_, requestId, 
timestamp), SeekArg{timestamp},
+  callback);
 }
 
 bool ConsumerImpl::isReadCompacted() { return readCompacted_; }
@@ -1509,7 +1511,7 @@ void 
ConsumerImpl::hasMessageAvailableAsync(HasMessageAvailableCallback callback
 (lastDequedMessageId_ == MessageId::earliest()) &&
 (startMessageId_.get().value_or(MessageId::earliest()) == 
MessageId::latest());
 }
-if (compareMarkDeletePosition) {
+if (compareMarkDeletePosition || 
hasSoughtByTimestamp_.load(std::memory_order_acquire)) {
 auto self = get_shared_this_ptr();
 getLastMessageIdAsync([self, callback](Result result, const 
GetLastMessageIdResponse& response) {
 if (result != ResultOk) {
@@ -1518,8 +1520,8 @@ void 
ConsumerImpl::hasMessageAvailableAsync(HasMessageAvailableCallback callback
 }
 auto handleResponse = [self, response, callback] {
 if (response.hasMarkDeletePosition() && 
response.getLastMessageId().entryId() >= 0) {
-// We only care about comparing ledger ids and entry ids 
as mark delete position doesn't
-// have other ids such as batch index
+// We only care about comparing ledger ids and entry ids 
as mark delete position
+// doesn't have other ids such as batch index
 auto compareResult = 
compareLedgerAndEntryId(response.getMarkDeletePosition(),
  
response.getLastMessageId());
 callback(ResultOk, 
self->config_.isStartMessageIdInclusive() ? compareResult <= 0
@@ -1528,7 +1530,8 @@ void 
ConsumerImpl::hasMessageAvailableAsync(HasMessageAvailableCallback callback
 callback(ResultOk, false);
 }
 };
-if (self->config_.isStartMessageIdInclusive()) {
+if (self->config_.isStartMessageIdInclusive() &&
+!self->hasSoughtByTimestamp_.load(std::memory_order_acquire)) {
 self->seekAsync(response.getLastMessageId(), [callback, 
handleResponse](Result result) {
 if (result != ResultOk) {
 callback(result, {});
@@ -1644,8 +1647,8 @@ bool ConsumerImpl::isConnected() const { return 
!getCnx().expired() && state_ ==
 
 uint64_t ConsumerImpl::getNumberOfConnectedConsumer() { return isConnected() ? 
1 : 0; }
 
-void ConsumerImpl::seekAsyncInternal(long requestId, SharedBuffer see

(pulsar-client-cpp) 03/05: Fix minor issues reported by CodeQL (#421)

2024-03-27 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git

commit 7cfd77506c83f259c69b440082d3b558b60695e4
Author: Matteo Merli 
AuthorDate: Wed Mar 27 02:47:42 2024 -0700

Fix minor issues reported by CodeQL (#421)

(cherry picked from commit 763b85c6c4b9bb648b9f7cf62f9ed09f04f3decb)
---
 lib/lz4/lz4.cc   | 6 +++---
 perf/PerfProducer.cc | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/lz4/lz4.cc b/lib/lz4/lz4.cc
index d63b977..2f98fb3 100644
--- a/lib/lz4/lz4.cc
+++ b/lib/lz4/lz4.cc
@@ -1175,9 +1175,9 @@ FORCE_INLINE int LZ4_decompress_generic(
 s = *ip++;
 length += s;
 } while (likely((endOnInput) ? ip < iend - RUN_MASK : 1) && (s == 
255));
-if ((safeDecode) && unlikely((size_t)(op + length) < (size_t)(op)))
+if ((safeDecode) && unlikely(length >= (size_t)(oend - op)))
 goto _output_error; /* overflow detection */
-if ((safeDecode) && unlikely((size_t)(ip + length) < (size_t)(ip)))
+if ((safeDecode) && unlikely(length >= (size_t)(iend - ip)))
 goto _output_error; /* overflow detection */
 }
 
@@ -1220,7 +1220,7 @@ FORCE_INLINE int LZ4_decompress_generic(
 s = *ip++;
 length += s;
 } while (s == 255);
-if ((safeDecode) && unlikely((size_t)(op + length) < (size_t)op))
+if ((safeDecode) && unlikely(length >= (size_t)(oend - op)))
 goto _output_error; /* overflow detection */
 }
 length += MINMATCH;
diff --git a/perf/PerfProducer.cc b/perf/PerfProducer.cc
index aeda8e8..cbfef68 100644
--- a/perf/PerfProducer.cc
+++ b/perf/PerfProducer.cc
@@ -160,7 +160,7 @@ void startPerfProducer(const Arguments& args, 
pulsar::ProducerConfiguration& pro
 limiter = std::make_shared(args.rate);
 }
 
-producerList.resize(args.numTopics * args.numProducers);
+producerList.resize((size_t)args.numTopics * args.numProducers);
 for (int i = 0; i < args.numTopics; i++) {
 std::string topic = (args.numTopics == 1) ? args.topic : args.topic + 
"-" + std::to_string(i);
 LOG_INFO("Adding " << args.numProducers << " producers on topic " << 
topic);



(pulsar-client-cpp) 01/05: Support customize vcpkg directory when INTEGRATE_VCPKG is ON (#417)

2024-03-27 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git

commit e7793d6752a6bbfd5f526ecf207bd3738179f29e
Author: Yunze Xu 
AuthorDate: Thu Mar 14 20:11:26 2024 +0800

Support customize vcpkg directory when INTEGRATE_VCPKG is ON (#417)

### Motivation

Currently when INTEGRATE_VCPKG is ON, the CMAKE_TOOLCHAIN_FILE variable
is always a subdirectory of `${CMAKE_SOURCE_DIR}/vcpkg`. We can only
customize the vcpkg directory when INTEGRATE_VCPKG is OFF, while the
legacy CMake logic is incompatible with this way.

### Modifications

When INTEGRATE_VCPKG is ON, only set CMAKE_TOOLCHAIN_FILE if it's not
defined. The workflow and README are updated for it.

(cherry picked from commit 821871777e247e1ccbfa323ea0d5136cf0e18711)
---
 .github/workflows/ci-pr-validation.yaml |  5 +
 CMakeLists.txt  |  4 +++-
 README.md   | 13 +
 3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/ci-pr-validation.yaml 
b/.github/workflows/ci-pr-validation.yaml
index d9dc2ca..5010411 100644
--- a/.github/workflows/ci-pr-validation.yaml
+++ b/.github/workflows/ci-pr-validation.yaml
@@ -114,6 +114,11 @@ jobs:
   cmake . -DINTEGRATE_VCPKG=ON -DBUILD_TESTS=ON -DBUILD_PERF_TOOLS=ON
   cmake --build . -j8
 
+  - name: Verify custom vcpkg installation
+run: |
+  mv vcpkg /tmp/
+  cmake -B build -DINTEGRATE_VCPKG=ON 
-DCMAKE_TOOLCHAIN_FILE="/tmp/vcpkg/scripts/buildsystems/vcpkg.cmake"
+
   cpp20-build:
 name: Build with the C++20 standard
 needs: formatting-check
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 662e84a..b004653 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,7 +24,9 @@ option(USE_ASIO "Use Asio instead of Boost.Asio" OFF)
 option(INTEGRATE_VCPKG "Integrate with Vcpkg" OFF)
 if (INTEGRATE_VCPKG)
 set(USE_ASIO ON)
-set(CMAKE_TOOLCHAIN_FILE 
"${CMAKE_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake")
+if (NOT CMAKE_TOOLCHAIN_FILE)
+set(CMAKE_TOOLCHAIN_FILE 
"${CMAKE_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake")
+endif ()
 endif ()
 
 option(BUILD_TESTS "Build tests" ON)
diff --git a/README.md b/README.md
index f0c13f0..4c86b63 100644
--- a/README.md
+++ b/README.md
@@ -47,6 +47,8 @@ Since it's integrated with vcpkg, see 
[vcpkg#README](https://github.com/microsof
 
 ### How to build from source
 
+The simplest way is to clone this project with the vcpkg submodule.
+
 ```bash
 git clone https://github.com/apache/pulsar-client-cpp.git
 cd pulsar-client-cpp
@@ -57,6 +59,17 @@ cmake --build build -j8
 
 The 1st step will download vcpkg and then install all dependencies according 
to the version description in [vcpkg.json](./vcpkg.json). The 2nd step will 
build the Pulsar C++ libraries under `./build/lib/`, where `./build` is the 
CMake build directory.
 
+> You can also add the CMAKE_TOOLCHAIN_FILE option if your system already have 
vcpkg installed.
+>
+> ```bash
+> git clone https://github.com/apache/pulsar-client-cpp.git
+> cd pulsar-client-cpp
+> # For example, you can install vcpkg in /tmp/vcpkg
+> cd /tmp && git clone https://github.com/microsoft/vcpkg.git && cd -
+> cmake -B build -DINTEGRATE_VCPKG=ON 
-DCMAKE_TOOLCHAIN_FILE="/tmp/vcpkg/scripts/buildsystems/vcpkg.cmake"
+> cmake --build build -j8
+> ```
+
 After the build, the hierarchy of the `build` directory will be:
 
 ```



(pulsar-client-cpp) 05/05: Release 3.5.1

2024-03-27 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git

commit 0ba3d7d8e9f7d3fb2f2cc3cdf918bb63c4791afc
Author: Yunze Xu 
AuthorDate: Thu Mar 28 10:45:07 2024 +0800

Release 3.5.1
---
 version.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/version.txt b/version.txt
index 1545d96..d5c0c99 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-3.5.0
+3.5.1



(pulsar-client-cpp) 02/05: Fix broken wireshark build workflow on macOS (#414)

2024-03-27 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git

commit 0e0ca8da3e7cabf76adb5d5ae30283f909e0aaa3
Author: Yunze Xu 
AuthorDate: Sun Mar 17 23:10:15 2024 +0800

Fix broken wireshark build workflow on macOS (#414)

### Motivation

See 
https://github.com/apache/pulsar-client-cpp/actions/runs/8276076995/job/22644077705

```
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/2to3
```

`brew install` failed because the wireshark dependency depends on
python@3.12 and it failed at `brew link`.

### Modifications

Remove the existing binaries that might conflict.

(cherry picked from commit c513f29fadce86bacaf4f878d8d25064f7560083)
---
 .github/workflows/ci-pr-validation.yaml | 5 +
 1 file changed, 5 insertions(+)

diff --git a/.github/workflows/ci-pr-validation.yaml 
b/.github/workflows/ci-pr-validation.yaml
index 5010411..9f113b0 100644
--- a/.github/workflows/ci-pr-validation.yaml
+++ b/.github/workflows/ci-pr-validation.yaml
@@ -64,6 +64,11 @@ jobs:
 run: |
   # See https://github.com/Homebrew/homebrew-core/issues/157142
   export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
+  cd /usr/local/bin
+  rm -f 2to3* idle3* pydoc* python3*
+  rm -f /usr/local/share/man/man1/python3.1 
/usr/local/lib/pkgconfig/python3*
+  cd /usr/local/Frameworks/Python.framework
+  rm -rf Headers Python Resources Versions/Current
   brew update
   brew install pkg-config wireshark protobuf
   - name: Build wireshark plugin



(pulsar-client-cpp) branch main updated: Fix wrong results of hasMessageAvailable and readNext after seeking by timestamp (#422)

2024-03-27 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


The following commit(s) were added to refs/heads/main by this push:
 new 27d8cc0  Fix wrong results of hasMessageAvailable and readNext after 
seeking by timestamp (#422)
27d8cc0 is described below

commit 27d8cc01d5b7cfce94a7d71259dca5cea83ae01e
Author: Yunze Xu 
AuthorDate: Thu Mar 28 10:36:12 2024 +0800

Fix wrong results of hasMessageAvailable and readNext after seeking by 
timestamp (#422)

Fixes https://github.com/apache/pulsar-client-cpp/issues/420

It's a catch-up for https://github.com/apache/pulsar/pull/22363
---
 lib/ConsumerImpl.cc | 41 ++
 lib/ConsumerImpl.h  | 15 +-
 tests/ReaderTest.cc | 84 ++---
 3 files changed, 104 insertions(+), 36 deletions(-)

diff --git a/lib/ConsumerImpl.cc b/lib/ConsumerImpl.cc
index 7d5250e..e5df421 100644
--- a/lib/ConsumerImpl.cc
+++ b/lib/ConsumerImpl.cc
@@ -1050,7 +1050,9 @@ void ConsumerImpl::messageProcessed(Message& msg, bool 
track) {
  */
 void ConsumerImpl::clearReceiveQueue() {
 if (duringSeek()) {
-startMessageId_ = seekMessageId_.get();
+if (!hasSoughtByTimestamp_.load(std::memory_order_acquire)) {
+startMessageId_ = seekMessageId_.get();
+}
 SeekStatus expected = SeekStatus::COMPLETED;
 if (seekStatus_.compare_exchange_strong(expected, 
SeekStatus::NOT_STARTED)) {
 auto seekCallback = seekCallback_.release();
@@ -1476,7 +1478,7 @@ void ConsumerImpl::seekAsync(const MessageId& msgId, 
ResultCallback callback) {
 return;
 }
 const auto requestId = client->newRequestId();
-seekAsyncInternal(requestId, Commands::newSeek(consumerId_, requestId, 
msgId), msgId, 0L, callback);
+seekAsyncInternal(requestId, Commands::newSeek(consumerId_, requestId, 
msgId), SeekArg{msgId}, callback);
 }
 
 void ConsumerImpl::seekAsync(uint64_t timestamp, ResultCallback callback) {
@@ -1495,8 +1497,8 @@ void ConsumerImpl::seekAsync(uint64_t timestamp, 
ResultCallback callback) {
 return;
 }
 const auto requestId = client->newRequestId();
-seekAsyncInternal(requestId, Commands::newSeek(consumerId_, requestId, 
timestamp), MessageId::earliest(),
-  timestamp, callback);
+seekAsyncInternal(requestId, Commands::newSeek(consumerId_, requestId, 
timestamp), SeekArg{timestamp},
+  callback);
 }
 
 bool ConsumerImpl::isReadCompacted() { return readCompacted_; }
@@ -1509,7 +1511,7 @@ void 
ConsumerImpl::hasMessageAvailableAsync(HasMessageAvailableCallback callback
 (lastDequedMessageId_ == MessageId::earliest()) &&
 (startMessageId_.get().value_or(MessageId::earliest()) == 
MessageId::latest());
 }
-if (compareMarkDeletePosition) {
+if (compareMarkDeletePosition || 
hasSoughtByTimestamp_.load(std::memory_order_acquire)) {
 auto self = get_shared_this_ptr();
 getLastMessageIdAsync([self, callback](Result result, const 
GetLastMessageIdResponse& response) {
 if (result != ResultOk) {
@@ -1518,8 +1520,8 @@ void 
ConsumerImpl::hasMessageAvailableAsync(HasMessageAvailableCallback callback
 }
 auto handleResponse = [self, response, callback] {
 if (response.hasMarkDeletePosition() && 
response.getLastMessageId().entryId() >= 0) {
-// We only care about comparing ledger ids and entry ids 
as mark delete position doesn't
-// have other ids such as batch index
+// We only care about comparing ledger ids and entry ids 
as mark delete position
+// doesn't have other ids such as batch index
 auto compareResult = 
compareLedgerAndEntryId(response.getMarkDeletePosition(),
  
response.getLastMessageId());
 callback(ResultOk, 
self->config_.isStartMessageIdInclusive() ? compareResult <= 0
@@ -1528,7 +1530,8 @@ void 
ConsumerImpl::hasMessageAvailableAsync(HasMessageAvailableCallback callback
 callback(ResultOk, false);
 }
 };
-if (self->config_.isStartMessageIdInclusive()) {
+if (self->config_.isStartMessageIdInclusive() &&
+!self->hasSoughtByTimestamp_.load(std::memory_order_acquire)) {
 self->seekAsync(response.getLastMessageId(), [callback, 
handleResponse](Result result) {
 if (result != ResultOk) {
 callback(result, {});
@@ -1644,8 +1647,8 @@ bool ConsumerImpl::isConnected() const { return 
!getCnx().expired() && state_ ==
 
 uint64_t ConsumerImpl::getNumberOfConn

(pulsar) branch master updated: [fix][client] Fix wrong results of hasMessageAvailable and readNext after seeking by timestamp (#22363)

2024-03-27 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
 new 149deaa5a79 [fix][client] Fix wrong results of hasMessageAvailable and 
readNext after seeking by timestamp (#22363)
149deaa5a79 is described below

commit 149deaa5a79ed8570489bead4215ae213a4e9206
Author: Yunze Xu 
AuthorDate: Wed Mar 27 19:49:27 2024 +0800

[fix][client] Fix wrong results of hasMessageAvailable and readNext after 
seeking by timestamp (#22363)

Co-authored-by: Lari Hotari 
---
 .../org/apache/pulsar/client/impl/ReaderTest.java  | 84 +++---
 .../apache/pulsar/client/impl/ConsumerImpl.java| 25 ---
 2 files changed, 89 insertions(+), 20 deletions(-)

diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/ReaderTest.java 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/ReaderTest.java
index cee3ea09968..2d3e8d4c6e9 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/ReaderTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/ReaderTest.java
@@ -66,8 +66,8 @@ import org.apache.pulsar.common.util.Murmur3_32Hash;
 import org.apache.pulsar.schema.Schemas;
 import org.awaitility.Awaitility;
 import org.testng.Assert;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
@@ -77,7 +77,7 @@ public class ReaderTest extends MockedPulsarServiceBaseTest {
 
 private static final String subscription = "reader-sub";
 
-@BeforeMethod
+@BeforeClass(alwaysRun = true)
 @Override
 protected void setup() throws Exception {
 super.internalSetup();
@@ -89,7 +89,7 @@ public class ReaderTest extends MockedPulsarServiceBaseTest {
 admin.namespaces().createNamespace("my-property/my-ns", 
Sets.newHashSet("test"));
 }
 
-@AfterMethod(alwaysRun = true)
+@AfterClass(alwaysRun = true)
 @Override
 protected void cleanup() throws Exception {
 super.internalCleanup();
@@ -198,21 +198,41 @@ public class ReaderTest extends 
MockedPulsarServiceBaseTest {
 testReadMessages(topic, true);
 }
 
-@Test
-public void testReadMessageWithBatchingWithMessageInclusive() throws 
Exception {
+@DataProvider
+public static Object[][] seekBeforeHasMessageAvailable() {
+return new Object[][] { { true }, { false } };
+}
+
+@Test(timeOut = 2, dataProvider = "seekBeforeHasMessageAvailable")
+public void testReadMessageWithBatchingWithMessageInclusive(boolean 
seekBeforeHasMessageAvailable)
+throws Exception {
 String topic = 
"persistent://my-property/my-ns/my-reader-topic-with-batching-inclusive";
 Set keys = publishMessages(topic, 10, true);
 
 Reader reader = 
pulsarClient.newReader().topic(topic).startMessageId(MessageId.latest)
 
.startMessageIdInclusive().readerName(subscription).create();
 
-while (reader.hasMessageAvailable()) {
-Assert.assertTrue(keys.remove(reader.readNext().getKey()));
+if (seekBeforeHasMessageAvailable) {
+reader.seek(0L); // it should seek to the earliest
 }
+
+assertTrue(reader.hasMessageAvailable());
+final Message msg = reader.readNext();
+assertTrue(keys.remove(msg.getKey()));
 // start from latest with start message inclusive should only read the 
last message in batch
 assertEquals(keys.size(), 9);
-Assert.assertFalse(keys.contains("key9"));
-Assert.assertFalse(reader.hasMessageAvailable());
+
+final MessageIdAdv msgId = (MessageIdAdv) msg.getMessageId();
+if (seekBeforeHasMessageAvailable) {
+assertEquals(msgId.getBatchIndex(), 0);
+assertFalse(keys.contains("key0"));
+assertTrue(reader.hasMessageAvailable());
+} else {
+assertEquals(msgId.getBatchIndex(), 9);
+assertFalse(reader.hasMessageAvailable());
+assertFalse(keys.contains("key9"));
+assertFalse(reader.hasMessageAvailable());
+}
 }
 
 private void testReadMessages(String topic, boolean enableBatch) throws 
Exception {
@@ -310,7 +330,7 @@ public class ReaderTest extends MockedPulsarServiceBaseTest 
{
 @Test
 public void testReaderWithTimeLong() throws Exception {
 String ns = "my-property/my-ns";
-String topic = "persistent://" + ns + "/testReadFromPartition";
+String topic = "persistent://" + ns + "/testReaderWithTimeLong";

(pulsar-client-cpp) branch main updated: Fix minor issues reported by CodeQL (#421)

2024-03-27 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


The following commit(s) were added to refs/heads/main by this push:
 new 763b85c  Fix minor issues reported by CodeQL (#421)
763b85c is described below

commit 763b85c6c4b9bb648b9f7cf62f9ed09f04f3decb
Author: Matteo Merli 
AuthorDate: Wed Mar 27 02:47:42 2024 -0700

Fix minor issues reported by CodeQL (#421)
---
 lib/lz4/lz4.cc   | 6 +++---
 perf/PerfProducer.cc | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/lz4/lz4.cc b/lib/lz4/lz4.cc
index d63b977..2f98fb3 100644
--- a/lib/lz4/lz4.cc
+++ b/lib/lz4/lz4.cc
@@ -1175,9 +1175,9 @@ FORCE_INLINE int LZ4_decompress_generic(
 s = *ip++;
 length += s;
 } while (likely((endOnInput) ? ip < iend - RUN_MASK : 1) && (s == 
255));
-if ((safeDecode) && unlikely((size_t)(op + length) < (size_t)(op)))
+if ((safeDecode) && unlikely(length >= (size_t)(oend - op)))
 goto _output_error; /* overflow detection */
-if ((safeDecode) && unlikely((size_t)(ip + length) < (size_t)(ip)))
+if ((safeDecode) && unlikely(length >= (size_t)(iend - ip)))
 goto _output_error; /* overflow detection */
 }
 
@@ -1220,7 +1220,7 @@ FORCE_INLINE int LZ4_decompress_generic(
 s = *ip++;
 length += s;
 } while (s == 255);
-if ((safeDecode) && unlikely((size_t)(op + length) < (size_t)op))
+if ((safeDecode) && unlikely(length >= (size_t)(oend - op)))
 goto _output_error; /* overflow detection */
 }
 length += MINMATCH;
diff --git a/perf/PerfProducer.cc b/perf/PerfProducer.cc
index aeda8e8..cbfef68 100644
--- a/perf/PerfProducer.cc
+++ b/perf/PerfProducer.cc
@@ -160,7 +160,7 @@ void startPerfProducer(const Arguments& args, 
pulsar::ProducerConfiguration& pro
 limiter = std::make_shared(args.rate);
 }
 
-producerList.resize(args.numTopics * args.numProducers);
+producerList.resize((size_t)args.numTopics * args.numProducers);
 for (int i = 0; i < args.numTopics; i++) {
 std::string topic = (args.numTopics == 1) ? args.topic : args.topic + 
"-" + std::to_string(i);
 LOG_INFO("Adding " << args.numProducers << " producers on topic " << 
topic);



svn commit: r68061 [2/2] - in /dev/pulsar/pulsar-client-python-3.5.0-candidate-2: ./ linux-glibc-arm64/ linux-glibc-x86_64/ linux-musl-arm64/ linux-musl-x86_64/ macos/ windows/

2024-03-22 Thread xyz
Added: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-2/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl
==
Binary file - no diff available.

Propchange: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-2/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl
--
svn:mime-type = application/octet-stream

Added: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-2/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl.asc
==
--- 
dev/pulsar/pulsar-client-python-3.5.0-candidate-2/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl.asc
 (added)
+++ 
dev/pulsar/pulsar-client-python-3.5.0-candidate-2/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl.asc
 Fri Mar 22 15:27:59 2024
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCgAdFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmX9opcACgkQQrtq+2zS
+b6ZeMw/5AWcUW9dHSV91mn4vntL820eQ7g7/wH3+HdvLnmXLdtxcike/6O4y0hCo
+Po2530+tDp5Naf+sYhjKOn6VVu4o6R+JoTv+RK0/TqNQH5NwIJq2QllcOL2+yI+l
+iCQPt+eEVAsGbR3U92yiBcPvuQMVk+NAxydPiwMFNj50apdbJNCeOMbEhQ+KA7VV
+ND5erQ5G+CpfKad37C+hh04Na78eu18h0nVvoOOT1Y5+Vxug8AIEXgjvM3K7wbI7
+ho4gWKvxQfXcARsK+21cETw0V3xwzPIFeBXgHgJdbvwelGorslr9n620M5d2ar9D
+qhBFtVkiFwU4Pihz7jr7oAGiayDQbFRmP/SDj1VQHSi5ElZ7nyTjZ+KY8xX3uo/5
+hLMR8QEZpnfWaou++D7lxypurl4O83MM8Ko3TL19E9BSHly2aD21t74l9EAh2xFB
+DR1DXuVqQCl2XqwC58p6Lremfpkv5Ud9qp99njnDXqb+RFqXrjucbFzOq2o3L8LI
+xCV0X0bw7C8GdStwTPoyqMYSVIYZGW6JkkF+AqtabGRoVxDa/fXNZc3sS/pvCvJb
+3nbP6fZCVTZDJYmsZ72aDyrGnskrHktyqpm3d9Ye/nqJ7abJqEqe0CekioH56W2z
+OKMt8Gdw9ZcZKOY02kEswSo++e+8UGn+XKLGWDOS/JfWL7dOiPc=
+=7k1/
+-END PGP SIGNATURE-

Added: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-2/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl.sha512
==
--- 
dev/pulsar/pulsar-client-python-3.5.0-candidate-2/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl.sha512
 (added)
+++ 
dev/pulsar/pulsar-client-python-3.5.0-candidate-2/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl.sha512
 Fri Mar 22 15:27:59 2024
@@ -0,0 +1 @@
+aa862f1e9a2c39f450d6e20a735cd3f39908ddf87fbe4b4620ba6d88ecff5a091f048b7e073d4d6060562cc3cf299fcec9e2672995f184bfff93958756e8cafd
  pulsar_client-3.5.0-cp38-cp38-win_amd64.whl

Added: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-2/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl
==
Binary file - no diff available.

Propchange: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-2/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl
--
svn:mime-type = application/octet-stream

Added: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-2/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl.asc
==
--- 
dev/pulsar/pulsar-client-python-3.5.0-candidate-2/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl.asc
 (added)
+++ 
dev/pulsar/pulsar-client-python-3.5.0-candidate-2/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl.asc
 Fri Mar 22 15:27:59 2024
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCgAdFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmX9opgACgkQQrtq+2zS
+b6bTTw/+JbD9LkWLGiHeZ36qpnCgf6FDXZDPYNbIKn374/znGROMyEakjw/TLNPU
+UoUWDx07aP2K7zN8NpeQEQKy7gX+lyFtyaaOPr634RVSoquqgKth2SCKPPOzoX/j
+JxRKFmN+egwoxb2SHcDG630nHsG/+7tWrfdU9DkQJAm9cwd9amdTnFZ86eOPeaZ3
+WWEwRy9+7kmRkaxZkE96k/bJaIP5vC7CzWticzObbxBPOYJo32DoeQVzr0ljlhTR
+jq4OMvtya93zfMPLxnUcMpP6IfE3xNfmzfP2cwBDVgo1ZrLu8zVN8F2Y7nKqb+a4
+1I81saUNJPI76qbWRI7A2H58QqiMtRHQ3hg7xETWK+F/LliwFapPSuZiuWCh9yGE
+1I3Rr7oC1R3WHHPGPbjsoFgfXND6n+hayt+8T684SLW858EOiB9yoQfuIH3FBz0K
++ielG7Cds5ciR371jm4cGURQOv5y7vJRUc2ZCz46I+SYaqsXfI15uuDB8aPfFscg
+n3mM2dEptRjy/ZWCsyASG8U2WJwLRVfd4bfP1R0t11G5B9Yn+Ts+Ic6hK0ixsE+B
+2sTxE1TkN8WJU8Sb2wWj4MQ7W0NTwH+oDDBrHmieZaEdU2s44SwJWGebtsWyBgXS
+nDVOtB56Uc8bI/G2+OEG5WKzq1XxjgKxKARNR/n1e1hjMqCSH9Y=
+=HTtg
+-END PGP SIGNATURE-

Added: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-2/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl.sha512
==
--- 
dev/pulsar/pulsar-client-python-3.5.0-candidate-2/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl.sha512
 (added)
+++ 
dev/pulsar/pulsar-client-python-3.5.0-candidate-2/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl.sha512
 Fri Mar 22 15:27:59 2024
@@ -0,0 +1 @@
+0c290e6dff72839c5fed22f935f7c9c22d33d39d850cc652fe9786866faf31d99fe4e9e94f77c796446a76fb448f8c86061ecbb645c015cb0b4f0bf08978a4de
  pulsar_client-3.5.0-cp39-cp39-win_amd64.whl




svn commit: r68061 [1/2] - in /dev/pulsar/pulsar-client-python-3.5.0-candidate-2: ./ linux-glibc-arm64/ linux-glibc-x86_64/ linux-musl-arm64/ linux-musl-x86_64/ macos/ windows/

2024-03-22 Thread xyz
Author: xyz
Date: Fri Mar 22 15:27:59 2024
New Revision: 68061

Log:
Staging artifacts and signature for Python client 3.5.0-candidate-2

Added:
dev/pulsar/pulsar-client-python-3.5.0-candidate-2/
dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-arm64/

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-arm64/pulsar_client-3.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-arm64/pulsar_client-3.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-arm64/pulsar_client-3.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-arm64/pulsar_client-3.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-arm64/pulsar_client-3.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-arm64/pulsar_client-3.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-arm64/pulsar_client-3.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-arm64/pulsar_client-3.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-arm64/pulsar_client-3.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-arm64/pulsar_client-3.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-arm64/pulsar_client-3.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-arm64/pulsar_client-3.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-arm64/pulsar_client-3.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-arm64/pulsar_client-3.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-arm64/pulsar_client-3.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.sha512
dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-x86_64/

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-x86_64/pulsar_client-3.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-x86_64/pulsar_client-3.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-x86_64/pulsar_client-3.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-x86_64/pulsar_client-3.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-x86_64/pulsar_client-3.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-x86_64/pulsar_client-3.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-x86_64/pulsar_client-3.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-x86_64/pulsar_client-3.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-x86_64/pulsar_client-3.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-x86_64/pulsar_client-3.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-x86_64/pulsar_client-3.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-x86_64/pulsar_client-3.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-x86_64/pulsar_client-3.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-2/linux-glibc-x86_64/pulsar_client-3.5.0-cp39-cp39

(pulsar-client-python) annotated tag v3.5.0-candidate-2 updated (730c2d7 -> a756f19)

2024-03-22 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to annotated tag v3.5.0-candidate-2
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git


*** WARNING: tag v3.5.0-candidate-2 was modified! ***

from 730c2d7  (commit)
  to a756f19  (tag)
 tagging 730c2d7dea60ff632688463662a6101cacb98c22 (commit)
 replaces v3.5.0-candidate-1
  by Yunze Xu
  on Fri Mar 22 18:54:45 2024 +0800

- Log -
Release v3.5.0 candidate 2
-BEGIN PGP SIGNATURE-

iQJDBAABCgAtFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmX9Y3UPHHh5ekBhcGFj
aGUub3JnAAoJEEK7avts0m+mzHQP/iM4pnmFoCCwRk3UVrK4f1Q8YWfrY7UNhHgl
oiDZbeNI+O9fVF3cyHVAgwBK+yqgGgDMworIB1sDAihuam77kA99LLuk8eP6J6CG
7mIJBnMBPkQGkx/B4Ymlaz5VvEjYHO9Gm+BSxJf6RCtnO6YHQXuERI9K50ZEJyfM
ejxhymOgNGhlVJ+ZtFOtJCA1bt6nvN5GJ8xsun9HpyLnOWcokRrxWmKSv11ydoI/
V2ejawjj141/z+KsMzV5iAbckxLAA7/zyYtLqPIB0U/ZvQh9jK4L9f1Z+CwgtAaq
qXlpcvE0rHWeIHZY+sMJx69ZbCAn6EdtA8iFFzAeQJgp7tOm6kVGmH6LPvRlXwf7
DRkPZ4RlZA8mVeFGrBpyPg/P/ftOvyCjA4AGPDP6B3ECVs+hs1OcPZqJ0ilRfjnk
h/6LcnkGVQJU6l0qSjjvxpkfoWLpJJdlUnvkcgNp+pEIqJKu1kFXCkQdg3FbG9+N
VW6X1eg35DHSoYR3tZcQbA/CWxviKM4pU3Ri9umeNzSMA6GraG8mGj6Rt2aggCSW
9ac+xgSi921hg09SnaCxZqeUkXy7cgp9Vn3yU3OGzj0EzOYjGd/bRAgRqLUbBWbQ
4YPn56ER8ksNRSmtIFP0XvA+Ha8SY9MGt+vohtCURAwM3U47IWRJpFA/G38s4q4J
m+YmxPWo
=WH2F
-END PGP SIGNATURE-
---


No new revisions were added by this update.

Summary of changes:



svn commit: r68057 - /dev/pulsar/pulsar-client-python-3.5.0-candidate-1/

2024-03-22 Thread xyz
Author: xyz
Date: Fri Mar 22 10:52:44 2024
New Revision: 68057

Log:
Delete the pulsar-client-python 3.5.0 candidate 1

Removed:
dev/pulsar/pulsar-client-python-3.5.0-candidate-1/



(pulsar-client-python) 01/01: Merge branch 'main' into branch-3.5

2024-03-22 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git

commit 730c2d7dea60ff632688463662a6101cacb98c22
Merge: 13c8c4e bc173fd
Author: Yunze Xu 
AuthorDate: Fri Mar 22 18:53:03 2024 +0800

Merge branch 'main' into branch-3.5

 pulsar/__init__.py   | 6 ++
 src/consumer.cc  | 1 +
 tests/pulsar_test.py | 8 
 3 files changed, 15 insertions(+)



(pulsar-client-python) branch branch-3.5 updated (13c8c4e -> 730c2d7)

2024-03-22 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git


from 13c8c4e  Bump version to 3.5.0
 add bc173fd  Add Consumer.consumer_name() API (#206)
 new 730c2d7  Merge branch 'main' into branch-3.5

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pulsar/__init__.py   | 6 ++
 src/consumer.cc  | 1 +
 tests/pulsar_test.py | 8 
 3 files changed, 15 insertions(+)



(pulsar-client-python) branch main updated: Add Consumer.consumer_name() API (#206)

2024-03-22 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git


The following commit(s) were added to refs/heads/main by this push:
 new bc173fd  Add Consumer.consumer_name() API (#206)
bc173fd is described below

commit bc173fd25560e12ba1e19b0661ad1a912e4d3857
Author: Yunze Xu 
AuthorDate: Fri Mar 22 18:50:20 2024 +0800

Add Consumer.consumer_name() API (#206)

Catch up for https://github.com/apache/pulsar-client-cpp/pull/360
---
 pulsar/__init__.py   | 6 ++
 src/consumer.cc  | 1 +
 tests/pulsar_test.py | 8 
 3 files changed, 15 insertions(+)

diff --git a/pulsar/__init__.py b/pulsar/__init__.py
index 9590fa3..fad33cd 100644
--- a/pulsar/__init__.py
+++ b/pulsar/__init__.py
@@ -1428,6 +1428,12 @@ class Consumer:
 """
 return self._consumer.subscription_name()
 
+def consumer_name(self):
+"""
+Return the consumer name.
+"""
+return self._consumer.consumer_name()
+
 def unsubscribe(self):
 """
 Unsubscribe the current consumer from the topic.
diff --git a/src/consumer.cc b/src/consumer.cc
index 346673a..e32a865 100644
--- a/src/consumer.cc
+++ b/src/consumer.cc
@@ -112,6 +112,7 @@ void export_consumer(py::module_& m) {
 .def("topic", ::getTopic, "return the topic this consumer is 
subscribed to",
  py::return_value_policy::copy)
 .def("subscription_name", ::getSubscriptionName, 
py::return_value_policy::copy)
+.def("consumer_name", ::getConsumerName, 
py::return_value_policy::copy)
 .def("unsubscribe", _unsubscribe)
 .def("receive", _receive)
 .def("receive", _receive_timeout)
diff --git a/tests/pulsar_test.py b/tests/pulsar_test.py
index a3b97b6..bb62d99 100755
--- a/tests/pulsar_test.py
+++ b/tests/pulsar_test.py
@@ -1886,5 +1886,13 @@ class PulsarTest(TestCase):
 
 client.close()
 
+def test_consumer_name(self):
+client = Client(self.serviceUrl)
+name = 'my-consumer-name'
+consumer = client.subscribe('test_consumer_name', 'sub', 
consumer_name=name)
+self.assertEqual(consumer.consumer_name(), name)
+client.close()
+
+
 if __name__ == "__main__":
 main()



svn commit: r68055 [1/2] - in /dev/pulsar/pulsar-client-python-3.5.0-candidate-1: ./ linux-glibc-arm64/ linux-glibc-x86_64/ linux-musl-arm64/ linux-musl-x86_64/ macos/ windows/

2024-03-22 Thread xyz
Author: xyz
Date: Fri Mar 22 06:15:07 2024
New Revision: 68055

Log:
Staging artifacts and signature for Python client 3.5.0-candidate-1

Added:
dev/pulsar/pulsar-client-python-3.5.0-candidate-1/
dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-arm64/

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-arm64/pulsar_client-3.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-arm64/pulsar_client-3.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-arm64/pulsar_client-3.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-arm64/pulsar_client-3.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-arm64/pulsar_client-3.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-arm64/pulsar_client-3.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-arm64/pulsar_client-3.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-arm64/pulsar_client-3.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-arm64/pulsar_client-3.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-arm64/pulsar_client-3.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-arm64/pulsar_client-3.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-arm64/pulsar_client-3.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-arm64/pulsar_client-3.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-arm64/pulsar_client-3.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-arm64/pulsar_client-3.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.sha512
dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-x86_64/

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-x86_64/pulsar_client-3.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-x86_64/pulsar_client-3.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-x86_64/pulsar_client-3.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-x86_64/pulsar_client-3.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-x86_64/pulsar_client-3.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-x86_64/pulsar_client-3.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-x86_64/pulsar_client-3.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-x86_64/pulsar_client-3.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-x86_64/pulsar_client-3.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-x86_64/pulsar_client-3.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-x86_64/pulsar_client-3.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.asc

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-x86_64/pulsar_client-3.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.sha512

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-x86_64/pulsar_client-3.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
   (with props)

dev/pulsar/pulsar-client-python-3.5.0-candidate-1/linux-glibc-x86_64/pulsar_client-3.5.0-cp39-cp39

svn commit: r68055 [2/2] - in /dev/pulsar/pulsar-client-python-3.5.0-candidate-1: ./ linux-glibc-arm64/ linux-glibc-x86_64/ linux-musl-arm64/ linux-musl-x86_64/ macos/ windows/

2024-03-22 Thread xyz
Added: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-1/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl
==
Binary file - no diff available.

Propchange: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-1/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl
--
svn:mime-type = application/octet-stream

Added: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-1/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl.asc
==
--- 
dev/pulsar/pulsar-client-python-3.5.0-candidate-1/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl.asc
 (added)
+++ 
dev/pulsar/pulsar-client-python-3.5.0-candidate-1/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl.asc
 Fri Mar 22 06:15:07 2024
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCgAdFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmX9IVUACgkQQrtq+2zS
+b6bnIA//T0bmHXqlX6ZluIdPanW27e+7I4XoYctf+WObTIskKpXfJglHI0ufNr0Z
+JvR0Iin9342bM+xetyXs1XaEuWha2gWiiZCNEjRsVZVEO8PNpaY1nh1dpUsOOtTu
+Y5YUsH1dervInhX9tU/fadb0RMSle3Ylfm8deYDZ0OQgq0bJpewgy8BX05qWbN7J
+YuZzqhDwdnog0jSrE6/PlvvqPyuYOKfzvs8hk70lpZDtya3kJ+Qqmy2CM98p9kfC
+TSyy8K7rsjtoQvklNA3upDkKag0DwuR2LneW64vPfh5jN8sA/3fMLizfi7BBcsE7
+4gpn1P8NbdQC/KGUYwFgS6xuh+JPFjCNBQyKXyU83+T2+xDJy2WfpUaiiYmMzQSu
+/gtpezz3lzHGNiOfnK7tWb+K443lgjcoAXDGEx8k9ig3HwMXwtPkXbRXo07LLjtN
+X9AlP1LPfr4jtYom/TneP0XurEWPHs9e016VeYRc8z04xQ26NcwfhfT+1UZu723z
+oX+YfU1cxM8uQzWB5XrejAhHlcRced4ITgM18wNpT9DqtzUJUou9q/YDQcC52Q1o
+IwVe9oXQzDqA01FV3KauAqXkrw7urBcpcxDUHM9iEBHwLLv8UR1RZ//tXpQ7tz6s
+UyLXdirm1F2EGcNr8DBnMSYH8DXwtmPzvrl8QV4H9H5+dDE/hyM=
+=ow2Y
+-END PGP SIGNATURE-

Added: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-1/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl.sha512
==
--- 
dev/pulsar/pulsar-client-python-3.5.0-candidate-1/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl.sha512
 (added)
+++ 
dev/pulsar/pulsar-client-python-3.5.0-candidate-1/windows/pulsar_client-3.5.0-cp38-cp38-win_amd64.whl.sha512
 Fri Mar 22 06:15:07 2024
@@ -0,0 +1 @@
+73fdd020308caf5ed8a1563b666525403f609af44c9ced6ab391dce17555413fa774169244f61a24b6afa4fe55b1ac1c90f78bd2a6eb1d6ad887a4674e43
  pulsar_client-3.5.0-cp38-cp38-win_amd64.whl

Added: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-1/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl
==
Binary file - no diff available.

Propchange: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-1/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl
--
svn:mime-type = application/octet-stream

Added: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-1/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl.asc
==
--- 
dev/pulsar/pulsar-client-python-3.5.0-candidate-1/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl.asc
 (added)
+++ 
dev/pulsar/pulsar-client-python-3.5.0-candidate-1/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl.asc
 Fri Mar 22 06:15:07 2024
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCgAdFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmX9IVYACgkQQrtq+2zS
+b6aM7g/+I0Gvv+xWTaTAzryO7Bu7rm3FPf8XGvd9hF1YR22o7uBbAZaKGWm4IJzj
+gHeSMGcDrUoby82/pcVGpCf+0fFA56dnRhD35+YUevYfYtAEFczxRgqUeYYatRyw
+cY5h6U+aw9/H+Dwjy57SQQ8H2qNvqRoea+XyCpGOA6urqulfVv9yMAOyD3nG2B18
+rXcAbVqTNmUg5ZUH9BaOQPrSGfEee/B3GlQUF854c6GGpnJMJilwoh9imuzYoTAi
+26oeHk9/qJj5p8b0MaaWpZDxzIbRptlOG+gZeWHUxrgPwgDVdPGSFuKouL3HpPrb
+5HI+QXhdZPn6KNCTlCDUhRxpcXhK6T85TBJBhlc95RnWBd+FbDZh4bvn8tw9ux0P
+dMDm8m6B+kABdsOORRpKlbsy6QiZ+HRn7T7V52jcjshKPiBrabQ0PzePg3Vm55Dr
+YQkEg6k4HTJFtsCkemgASFMjgAy9X/7lNuSS7YkSaCjfTEouGPlxy6xIcAyHgW/s
+P+nDQ4+5vKNaLg1Ob1HB6gAU0BfQ9jd6TDgHyGwJBGrbJ+Z4uT3Am1dvzphWpTO/
+gOPwh7X3sWKncEeflQ0jOkZ0qMUSlu/XYiNEicdfEhsthzggS/lwvXqhX/+iIaQ3
+a9Rn6M7Kqd2p8frqPbhVglROVdeBWcwfv+crRKonuxCOUNoHxWE=
+=cZYH
+-END PGP SIGNATURE-

Added: 
dev/pulsar/pulsar-client-python-3.5.0-candidate-1/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl.sha512
==
--- 
dev/pulsar/pulsar-client-python-3.5.0-candidate-1/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl.sha512
 (added)
+++ 
dev/pulsar/pulsar-client-python-3.5.0-candidate-1/windows/pulsar_client-3.5.0-cp39-cp39-win_amd64.whl.sha512
 Fri Mar 22 06:15:07 2024
@@ -0,0 +1 @@
+1d70ee7c8476cdb625464261c37707326ef18b40f130883d21e11a58c21ab6a8b7c322f3bd412e8e7bdde3c5cbbd3b1136627bf42da978b48cfb9e3cc2c76121
  pulsar_client-3.5.0-cp39-cp39-win_amd64.whl




(pulsar-client-python) annotated tag v3.5.0-candidate-1 updated (13c8c4e -> a094fdd)

2024-03-21 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to annotated tag v3.5.0-candidate-1
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git


*** WARNING: tag v3.5.0-candidate-1 was modified! ***

from 13c8c4e  (commit)
  to a094fdd  (tag)
 tagging 13c8c4e621737395d6b9648e2bf0150d66eedbe6 (commit)
  by Yunze Xu
  on Fri Mar 22 10:15:15 2024 +0800

- Log -
Release v3.5.0 candidate 1
-BEGIN PGP SIGNATURE-

iQJDBAABCgAtFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmX86bMPHHh5ekBhcGFj
aGUub3JnAAoJEEK7avts0m+mSusQAIGcZb6wL1LhQDRfAIcV+1RJRTjWeSXs5+Ha
6cD++IFac3w9+fbKYu9FBzaqG5FzPXWwSbO618OWYPR0BgOrKFYS5+mGWjEZFIaZ
VK7pXvMrY6qHBSPWtXuGvqE9dVzB8anzo2Bm8XeuZbYKSJUPaqpuSmLtP0LgKgH/
hHski8stKFAwPFXl+erPOJKra9LeNTswGysnQQyqtuMkDTLkfLtpmET55VqeyTQc
DTB8gJxUCJxMsMVJ/qNxcjDvOc3vHeH6lHmEE87CPvaza8BboQ8MP9qU8tsueqZB
QYdCxbJyPNjjk+YWfdKziybOmzG/9JneZN8TB1vQJqnnp6RwbuAWpWtvVqJC9cU0
7PKJq9GpBY7cq6sK4rwMddx47lJbM9afQawW2C7TefEzthgQZGqr7IgNUpL0d5H7
uIlvcdLtB46Layt0i5ECnIhCdtOJJFc3uz9c1LneRKAArfefhbr1Hni94MK5HkHy
noPMyFgiTPvnXHQUipzNRsN6uIbP3fHnUKZ9nqZIL/0lz1t459vFOhMpusAm4AgP
anku6oqaZ2NHI9geVDhPJWEsRnEyS/ohB+2FV2QbUt+bIRTXUuXkjSQbiATN74qi
LEJnLSCyQ7mu/7uzsKzrF1gxJJVP4XF0z1dSOIiDgOxJBgwYCqMtKYn4ipMVudLd
mPtNPSVC
=/agE
-END PGP SIGNATURE-
---


No new revisions were added by this update.

Summary of changes:



(pulsar-client-python) branch branch-3.5 created (now 13c8c4e)

2024-03-21 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git


  at 13c8c4e  Bump version to 3.5.0

This branch includes the following new commits:

 new 13c8c4e  Bump version to 3.5.0

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




(pulsar-client-python) 01/01: Bump version to 3.5.0

2024-03-21 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git

commit 13c8c4e621737395d6b9648e2bf0150d66eedbe6
Author: Yunze Xu 
AuthorDate: Fri Mar 22 10:14:44 2024 +0800

Bump version to 3.5.0
---
 pulsar/__about__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pulsar/__about__.py b/pulsar/__about__.py
index e891b1b..aca9e7b 100644
--- a/pulsar/__about__.py
+++ b/pulsar/__about__.py
@@ -16,4 +16,4 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-__version__='3.5.0a1'
+__version__='3.5.0'



(pulsar-client-python) branch main updated: Fix incorrect type hints in Client (#204)

2024-03-20 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git


The following commit(s) were added to refs/heads/main by this push:
 new d1727cf  Fix incorrect type hints in Client (#204)
d1727cf is described below

commit d1727cf7432f49c7da81dab36b51277be772dd01
Author: Yunze Xu 
AuthorDate: Thu Mar 21 13:18:00 2024 +0800

Fix incorrect type hints in Client (#204)

Fixes https://github.com/apache/pulsar-client-python/issues/188
---
 pulsar/__init__.py | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/pulsar/__init__.py b/pulsar/__init__.py
index 99b225f..a46c209 100644
--- a/pulsar/__init__.py
+++ b/pulsar/__init__.py
@@ -43,7 +43,7 @@ Read the instructions on `source code repository
 """
 
 import logging
-from typing import List, Tuple, Optional
+from typing import List, Tuple, Optional, Union
 
 import _pulsar
 
@@ -627,7 +627,7 @@ class Client:
 properties=None,
 batching_type: BatchingType = BatchingType.Default,
 encryption_key=None,
-crypto_key_reader: CryptoKeyReader = None,
+crypto_key_reader: Union[None, CryptoKeyReader] = None,
 access_mode: ProducerAccessMode = 
ProducerAccessMode.Shared,
 ):
 """
@@ -804,7 +804,7 @@ class Client:
   properties=None,
   pattern_auto_discovery_period=60,
   initial_position: InitialPosition = InitialPosition.Latest,
-  crypto_key_reader: CryptoKeyReader = None,
+  crypto_key_reader: Union[None, CryptoKeyReader] = None,
   replicate_subscription_state_enabled=False,
   max_pending_chunked_message=10,
   auto_ack_oldest_chunked_message_on_queue_full=False,
@@ -813,7 +813,7 @@ class Client:
   key_shared_policy=None,
   batch_index_ack_enabled=False,
   regex_subscription_mode: RegexSubscriptionMode = 
RegexSubscriptionMode.PersistentOnly,
-  dead_letter_policy: ConsumerDeadLetterPolicy = None,
+  dead_letter_policy: Union[None, ConsumerDeadLetterPolicy] = 
None,
   ):
 """
 Subscribe to the given topic and subscription combination.
@@ -1005,7 +1005,7 @@ class Client:
   reader_name=None,
   subscription_role_prefix=None,
   is_read_compacted=False,
-  crypto_key_reader: CryptoKeyReader = None,
+  crypto_key_reader: Union[None, CryptoKeyReader] = None,
   start_message_id_inclusive=False
   ):
 """



(pulsar-client-python) branch merlimat-patch-1 deleted (was ceb2a63)

2024-03-18 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch merlimat-patch-1
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git


 was ceb2a63  Merge branch 'main' into merlimat-patch-1

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(pulsar-client-python) branch main updated: Enable CodeQL static scanner (#197)

2024-03-18 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git


The following commit(s) were added to refs/heads/main by this push:
 new 1aca467  Enable CodeQL static scanner (#197)
1aca467 is described below

commit 1aca467ee4a7ec8d4ef3249e45bf5dfc03db411a
Author: Matteo Merli 
AuthorDate: Mon Mar 18 20:30:52 2024 -0700

Enable CodeQL static scanner (#197)

Co-authored-by: Yunze Xu 
---
 .github/workflows/codeql.yml | 80 
 1 file changed, 80 insertions(+)

diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 000..f9e45f6
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,80 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+name: "CodeQL"
+
+on:
+  push:
+branches: [ "main" ]
+  pull_request:
+branches: [ "main" ]
+  schedule:
+- cron: '27 21 * * 6'
+
+jobs:
+  analyze:
+name: Analyze
+runs-on: 'ubuntu-latest'
+timeout-minutes: 360
+permissions:
+  # required for all workflows
+  security-events: write
+
+  # only required for workflows in private repositories
+  actions: read
+  contents: read
+
+strategy:
+  fail-fast: false
+  matrix:
+language: [ 'c-cpp', 'python' ]
+
+steps:
+- name: Checkout repository
+  uses: actions/checkout@v4
+
+# Initializes the CodeQL tools for scanning.
+- name: Initialize CodeQL
+  uses: github/codeql-action/init@v3
+  with:
+languages: ${{ matrix.language }}
+# If you wish to specify custom queries, you can do so here or in a 
config file.
+# By default, queries listed here will override any specified in a 
config file.
+# Prefix the list here with "+" to use these queries and those in the 
config file.
+
+# For more details on CodeQL's query packs, refer to: 
https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
+# queries: security-extended,security-and-quality
+
+- uses: actions/setup-python@v5
+  with:
+python-version: "3.12"
+
+- name: Install Pulsar C++ client
+  run: build-support/install-dependencies.sh
+
+- name: CMake
+  run: cmake .
+
+- name: Build
+  run: make -j8
+
+- name: Perform CodeQL Analysis
+  uses: github/codeql-action/analyze@v3
+  with:
+category: "/language:${{matrix.language}}"



(pulsar-client-python) branch merlimat-patch-1 updated (995ba36 -> ceb2a63)

2024-03-18 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch merlimat-patch-1
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git


from 995ba36  Enable CodeQL static scanner
 add 865bc9d  Disable topic level policies to make tests work for latest 
Pulsar (#201)
 add 48be179  Fix incorrect logs when a message failed to be decoded with 
the writer schema (#200)
 add ceb2a63  Merge branch 'main' into merlimat-patch-1

No new revisions were added by this update.

Summary of changes:
 pulsar/schema/schema_avro.py| 3 ++-
 tests/test-conf/standalone-ssl.conf | 5 +
 2 files changed, 7 insertions(+), 1 deletion(-)



(pulsar-client-cpp) branch main updated: Bumped version to 3.6.0-pre (#418)

2024-03-17 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


The following commit(s) were added to refs/heads/main by this push:
 new 788227e  Bumped version to 3.6.0-pre (#418)
788227e is described below

commit 788227ee930d39459d6d763eda94b992f3e1c1f6
Author: Yunze Xu 
AuthorDate: Mon Mar 18 10:04:21 2024 +0800

Bumped version to 3.6.0-pre (#418)
---
 version.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/version.txt b/version.txt
index b10ed39..d30d3d8 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-3.5.0-pre
+3.6.0-pre



(pulsar-client-cpp) branch main updated: Fix broken wireshark build workflow on macOS (#414)

2024-03-17 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


The following commit(s) were added to refs/heads/main by this push:
 new c513f29  Fix broken wireshark build workflow on macOS (#414)
c513f29 is described below

commit c513f29fadce86bacaf4f878d8d25064f7560083
Author: Yunze Xu 
AuthorDate: Sun Mar 17 23:10:15 2024 +0800

Fix broken wireshark build workflow on macOS (#414)

### Motivation

See 
https://github.com/apache/pulsar-client-cpp/actions/runs/8276076995/job/22644077705

```
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/2to3
```

`brew install` failed because the wireshark dependency depends on
python@3.12 and it failed at `brew link`.

### Modifications

Remove the existing binaries that might conflict.
---
 .github/workflows/ci-pr-validation.yaml | 5 +
 1 file changed, 5 insertions(+)

diff --git a/.github/workflows/ci-pr-validation.yaml 
b/.github/workflows/ci-pr-validation.yaml
index 5010411..9f113b0 100644
--- a/.github/workflows/ci-pr-validation.yaml
+++ b/.github/workflows/ci-pr-validation.yaml
@@ -64,6 +64,11 @@ jobs:
 run: |
   # See https://github.com/Homebrew/homebrew-core/issues/157142
   export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
+  cd /usr/local/bin
+  rm -f 2to3* idle3* pydoc* python3*
+  rm -f /usr/local/share/man/man1/python3.1 
/usr/local/lib/pkgconfig/python3*
+  cd /usr/local/Frameworks/Python.framework
+  rm -rf Headers Python Resources Versions/Current
   brew update
   brew install pkg-config wireshark protobuf
   - name: Build wireshark plugin



(pulsar-site) branch bewaremypower/release-note-cpp-3.5.0 deleted (was a47f47c933ef)

2024-03-16 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch bewaremypower/release-note-cpp-3.5.0
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


 was a47f47c933ef Add the release note for C++ client 3.5.0

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(pulsar-site) branch gen-cpp-apidoc deleted (was 2c9a253ab2f3)

2024-03-15 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch gen-cpp-apidoc
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


 was 2c9a253ab2f3 Generate API docs for C++ client 3.5.0

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(pulsar-site) branch gen-cpp-apidoc created (now 2c9a253ab2f3)

2024-03-15 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch gen-cpp-apidoc
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


  at 2c9a253ab2f3 Generate API docs for C++ client 3.5.0

This branch includes the following new commits:

 new 2c9a253ab2f3 Generate API docs for C++ client 3.5.0

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




(pulsar-site) 01/01: Add the release note for C++ client 3.5.0

2024-03-15 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch bewaremypower/release-note-cpp-3.5.0
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git

commit 5586abd241a12fd157951125c6f9f1e5fe527732
Author: Yunze Xu 
AuthorDate: Fri Mar 15 21:36:15 2024 +0800

Add the release note for C++ client 3.5.0
---
 data/release-cpp.js |  1 +
 release-notes/versioned/client-cpp-3.5.0.md | 56 +
 2 files changed, 57 insertions(+)

diff --git a/data/release-cpp.js b/data/release-cpp.js
index f06b5c5ec950..256e20ac0e2b 100644
--- a/data/release-cpp.js
+++ b/data/release-cpp.js
@@ -1,4 +1,5 @@
 module.exports = [
+{tagName: 
"v3.5.0",vtag:"3.5.x",releaseNotes:"/release-notes/versioned/client-cpp-3.5.0/",doc:"/docs/client-libraries-cpp",version:"v3.5.x"},
 {tagName: 
"v3.4.2",vtag:"3.4.x",releaseNotes:"/release-notes/versioned/client-cpp-3.4.2/",doc:"/docs/client-libraries-cpp",version:"v3.4.x"},
 {tagName: 
"v3.4.1",vtag:"3.4.x",releaseNotes:"/release-notes/versioned/client-cpp-3.4.1/",doc:"/docs/client-libraries-cpp",version:""},
 {tagName: 
"v3.4.0",vtag:"3.4.x",releaseNotes:"/release-notes/versioned/client-cpp-3.4.0/",doc:"/docs/client-libraries-cpp",version:""},
diff --git a/release-notes/versioned/client-cpp-3.5.0.md 
b/release-notes/versioned/client-cpp-3.5.0.md
new file mode 100644
index ..b7e3c5301d13
--- /dev/null
+++ b/release-notes/versioned/client-cpp-3.5.0.md
@@ -0,0 +1,56 @@
+## What's Changed
+* Fix ProducerBusy or ConsumerBusy error when configuring multiple brokers per 
connection by @BewareMyPower in 
https://github.com/apache/pulsar-client-cpp/pull/337
+* Use absolute path to find credential files in unit tests by @BewareMyPower 
in https://github.com/apache/pulsar-client-cpp/pull/340
+* Fix close() returns ResultAlreadyClosed after unsubscribe or close by 
@BewareMyPower in https://github.com/apache/pulsar-client-cpp/pull/338
+* Fix lazy partitioned producer might send duplicated messages by 
@BewareMyPower in https://github.com/apache/pulsar-client-cpp/pull/342
+* Bumped version to 3.5.0-pre by @BewareMyPower in 
https://github.com/apache/pulsar-client-cpp/pull/344
+* Fix crash when removing connection from the pool by @BewareMyPower in 
https://github.com/apache/pulsar-client-cpp/pull/347
+* Log topic lookup result by @erobot in 
https://github.com/apache/pulsar-client-cpp/pull/351
+* Fix bad_weak_ptr when close a ClientConnection during construction by 
@BewareMyPower in https://github.com/apache/pulsar-client-cpp/pull/350
+* Fix the flush callback might be called repeatedly by @BewareMyPower in 
https://github.com/apache/pulsar-client-cpp/pull/353
+* Fix Protobuf symbols not found in libpulsarwithdeps.a when building on macOS 
by @BewareMyPower in https://github.com/apache/pulsar-client-cpp/pull/354
+* Gather the macOS binaries when releasing by @BewareMyPower in 
https://github.com/apache/pulsar-client-cpp/pull/355
+* Fix HTTP lookup segfault when the redirect host cannot be resolved by 
@BewareMyPower in https://github.com/apache/pulsar-client-cpp/pull/356
+* Install Version.h when installing by CMakeLists by @BewareMyPower in 
https://github.com/apache/pulsar-client-cpp/pull/361
+* Add the Consumer::getConsumerName API by @BewareMyPower in 
https://github.com/apache/pulsar-client-cpp/pull/360
+* Fix accessing destroyed objects in the callback of async_wait by 
@BewareMyPower in https://github.com/apache/pulsar-client-cpp/pull/362
+* Fix tlsTrustCertsFilePath config is not applied for OAuth2 by @BewareMyPower 
in https://github.com/apache/pulsar-client-cpp/pull/364
+* [feat] [C API] Expose Get/Set Listener Name in C API by @roryschadler in 
https://github.com/apache/pulsar-client-cpp/pull/370
+* Integrate vcpkg to manage dependencies for all platforms by @BewareMyPower 
in https://github.com/apache/pulsar-client-cpp/pull/371
+* Fix the unstable wireshark workflow on macOS by @BewareMyPower in 
https://github.com/apache/pulsar-client-cpp/pull/374
+* [PIP-60] [Proxy-Client] Support SNI routing for Pulsar CPP client by 
@rdhabalia in https://github.com/apache/pulsar-client-cpp/pull/373
+* [fix] Fix issue where custom logger setting is ignored by @massakam in 
https://github.com/apache/pulsar-client-cpp/pull/377
+* Retry on new partition producer creation failure by @erobot in 
https://github.com/apache/pulsar-client-cpp/pull/378
+* Remove the Boost.Random dependency by @BewareMyPower in 
https://github.com/apache/pulsar-client-cpp/pull/380
+* Depend on the independent Asio instead of Boost.Asio by default by 
@BewareMyPower in https://github.com/apache/pulsar-client-cpp/pull/382
+* Fix Boost source code download failure by @BewareMyPower in 
https://github.com/apache/p

(pulsar-site) branch bewaremypower/release-note-cpp-3.5.0 created (now 5586abd241a1)

2024-03-15 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch bewaremypower/release-note-cpp-3.5.0
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


  at 5586abd241a1 Add the release note for C++ client 3.5.0

This branch includes the following new commits:

 new 5586abd241a1 Add the release note for C++ client 3.5.0

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




svn commit: r67966 - /dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/ /release/pulsar/pulsar-client-cpp-3.5.0/

2024-03-15 Thread xyz
Author: xyz
Date: Fri Mar 15 13:26:11 2024
New Revision: 67966

Log:
Release Apache Pulsar Client C++ 3.5.0

Added:
release/pulsar/pulsar-client-cpp-3.5.0/
  - copied from r67965, 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/
Removed:
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/



(pulsar-client-cpp) annotated tag v3.5.0 updated (916af95 -> a7d828c)

2024-03-15 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to annotated tag v3.5.0
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


*** WARNING: tag v3.5.0 was modified! ***

from 916af95  (commit)
  to a7d828c  (tag)
 tagging 916af95dda4d06162f9ea4e4180f9fd726c25a4e (commit)
 replaces v3.5.0-candidate-1
  by Yunze Xu
  on Fri Mar 15 21:24:37 2024 +0800

- Log -
Release v3.5.0
-BEGIN PGP SIGNATURE-

iQJDBAABCgAtFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmX0TBUPHHh5ekBhcGFj
aGUub3JnAAoJEEK7avts0m+mm58QAKQq0wszgk1yymOKylzdVgMR/xrhKGX0C97I
aiig13qTReYvRcauTXDcjEei3oxFZ0zA0kUrQsDZOsPBtIZm2iBQFCtKhXoCKAOs
o9y5mq3PwIM2RaT4+Ip4HwAJ9H05V8MgLl8SitNiLpcEPmAwILYQN51UceWrBKBZ
l9Rs4xYImX1Yb+7Oex9KdJkxLW9xCixsnxsTqciCMop7LFKh7EBUewzvO9J4PLIQ
XZ5JXIgYfavqbiAG4j1dMq3boNA29gQwfjuDGlZpDJbvovIdaUTPhWBxUSY87k18
EwmIyEFC0L2bPv7xl/dS1qS1rN712arbIHFVT2FOsYIsJhVQgJ+7Y0RUsN4QUa64
62tB0bcmmNLaa8bnhn0Oazjj90zDKftaaEVYb/Fm/YGSwkSSfP+FStEFlZGrDMwh
cQobjH20BZvMVPe8qHG2/R3bZF1IjVE8iqsV4pkro7AIQLVayLrNbw4hOo+eaYKT
lAxmkOx4PQcvTbgPj6moVu8qCtmKAWRn/8DWP40ZrcFOKpimOKoJwJTW0lHapzo1
K+NABQZ2EkbFjUZuvEpFUmlOtBfBNYjd+mZWh7qLHfUjL8cV+L5l4E/rlD+u8j2o
R6YSzPgUGQxLPPR1mWicVtm+7ZxQ+O91OSi/SJkVLXJExfmYW6VUw4JXNL5qHvUv
5U1yPZzd
=2kKx
-END PGP SIGNATURE-
---


No new revisions were added by this update.

Summary of changes:



(pulsar-client-cpp) branch main updated: Support customize vcpkg directory when INTEGRATE_VCPKG is ON (#417)

2024-03-14 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


The following commit(s) were added to refs/heads/main by this push:
 new 8218717  Support customize vcpkg directory when INTEGRATE_VCPKG is ON 
(#417)
8218717 is described below

commit 821871777e247e1ccbfa323ea0d5136cf0e18711
Author: Yunze Xu 
AuthorDate: Thu Mar 14 20:11:26 2024 +0800

Support customize vcpkg directory when INTEGRATE_VCPKG is ON (#417)

### Motivation

Currently when INTEGRATE_VCPKG is ON, the CMAKE_TOOLCHAIN_FILE variable
is always a subdirectory of `${CMAKE_SOURCE_DIR}/vcpkg`. We can only
customize the vcpkg directory when INTEGRATE_VCPKG is OFF, while the
legacy CMake logic is incompatible with this way.

### Modifications

When INTEGRATE_VCPKG is ON, only set CMAKE_TOOLCHAIN_FILE if it's not
defined. The workflow and README are updated for it.
---
 .github/workflows/ci-pr-validation.yaml |  5 +
 CMakeLists.txt  |  4 +++-
 README.md   | 13 +
 3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/ci-pr-validation.yaml 
b/.github/workflows/ci-pr-validation.yaml
index d9dc2ca..5010411 100644
--- a/.github/workflows/ci-pr-validation.yaml
+++ b/.github/workflows/ci-pr-validation.yaml
@@ -114,6 +114,11 @@ jobs:
   cmake . -DINTEGRATE_VCPKG=ON -DBUILD_TESTS=ON -DBUILD_PERF_TOOLS=ON
   cmake --build . -j8
 
+  - name: Verify custom vcpkg installation
+run: |
+  mv vcpkg /tmp/
+  cmake -B build -DINTEGRATE_VCPKG=ON 
-DCMAKE_TOOLCHAIN_FILE="/tmp/vcpkg/scripts/buildsystems/vcpkg.cmake"
+
   cpp20-build:
 name: Build with the C++20 standard
 needs: formatting-check
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 662e84a..b004653 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,7 +24,9 @@ option(USE_ASIO "Use Asio instead of Boost.Asio" OFF)
 option(INTEGRATE_VCPKG "Integrate with Vcpkg" OFF)
 if (INTEGRATE_VCPKG)
 set(USE_ASIO ON)
-set(CMAKE_TOOLCHAIN_FILE 
"${CMAKE_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake")
+if (NOT CMAKE_TOOLCHAIN_FILE)
+set(CMAKE_TOOLCHAIN_FILE 
"${CMAKE_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake")
+endif ()
 endif ()
 
 option(BUILD_TESTS "Build tests" ON)
diff --git a/README.md b/README.md
index f0c13f0..4c86b63 100644
--- a/README.md
+++ b/README.md
@@ -47,6 +47,8 @@ Since it's integrated with vcpkg, see 
[vcpkg#README](https://github.com/microsof
 
 ### How to build from source
 
+The simplest way is to clone this project with the vcpkg submodule.
+
 ```bash
 git clone https://github.com/apache/pulsar-client-cpp.git
 cd pulsar-client-cpp
@@ -57,6 +59,17 @@ cmake --build build -j8
 
 The 1st step will download vcpkg and then install all dependencies according 
to the version description in [vcpkg.json](./vcpkg.json). The 2nd step will 
build the Pulsar C++ libraries under `./build/lib/`, where `./build` is the 
CMake build directory.
 
+> You can also add the CMAKE_TOOLCHAIN_FILE option if your system already have 
vcpkg installed.
+>
+> ```bash
+> git clone https://github.com/apache/pulsar-client-cpp.git
+> cd pulsar-client-cpp
+> # For example, you can install vcpkg in /tmp/vcpkg
+> cd /tmp && git clone https://github.com/microsoft/vcpkg.git && cd -
+> cmake -B build -DINTEGRATE_VCPKG=ON 
-DCMAKE_TOOLCHAIN_FILE="/tmp/vcpkg/scripts/buildsystems/vcpkg.cmake"
+> cmake --build build -j8
+> ```
+
 After the build, the hierarchy of the `build` directory will be:
 
 ```



(pulsar-client-cpp) branch main updated: [feat] Add startPaused setting to consumer (#416)

2024-03-14 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


The following commit(s) were added to refs/heads/main by this push:
 new 234a55d  [feat] Add startPaused setting to consumer (#416)
234a55d is described below

commit 234a55d924ad263144a4e2661a3c6f1985fe7322
Author: Masahiro Sakamoto 
AuthorDate: Thu Mar 14 19:32:14 2024 +0900

[feat] Add startPaused setting to consumer (#416)

### Motivation

The Java client consumer has a setting called `startPaused`. If this is set 
to true, the created consumer will not fetch messages from the broker until 
resume is called. Currently, this setting does not seem to exist in the C++ 
client consumer, so I will add it.
---
 include/pulsar/ConsumerConfiguration.h| 15 +
 include/pulsar/c/consumer_configuration.h |  6 
 lib/ConsumerConfiguration.cc  |  7 
 lib/ConsumerConfigurationImpl.h   |  1 +
 lib/ConsumerImpl.cc   |  2 +-
 lib/c/c_ConsumerConfiguration.cc  |  9 +
 tests/BasicEndToEndTest.cc| 56 +--
 7 files changed, 93 insertions(+), 3 deletions(-)

diff --git a/include/pulsar/ConsumerConfiguration.h 
b/include/pulsar/ConsumerConfiguration.h
index 8bd95da..eef2bdd 100644
--- a/include/pulsar/ConsumerConfiguration.h
+++ b/include/pulsar/ConsumerConfiguration.h
@@ -659,6 +659,21 @@ class PULSAR_PUBLIC ConsumerConfiguration {
  */
 bool isAckReceiptEnabled() const;
 
+/**
+ * Starts the consumer in a paused state.
+ *
+ * When enabled, the consumer does not immediately fetch messages when the 
consumer is created.
+ * Instead, the consumer waits to fetch messages until 
Consumer::resumeMessageListener is called.
+ *
+ * Default: false
+ */
+ConsumerConfiguration& setStartPaused(bool startPaused);
+
+/**
+ * The associated getter of setStartPaused.
+ */
+bool isStartPaused() const;
+
 friend class PulsarWrapper;
 friend class PulsarFriend;
 
diff --git a/include/pulsar/c/consumer_configuration.h 
b/include/pulsar/c/consumer_configuration.h
index 06707f9..5682360 100644
--- a/include/pulsar/c/consumer_configuration.h
+++ b/include/pulsar/c/consumer_configuration.h
@@ -353,6 +353,12 @@ PULSAR_PUBLIC pulsar_consumer_regex_subscription_mode
 pulsar_consumer_configuration_get_regex_subscription_mode(
 pulsar_consumer_configuration_t *consumer_configuration);
 
+PULSAR_PUBLIC void pulsar_consumer_configuration_set_start_paused(
+pulsar_consumer_configuration_t *consumer_configuration, int start_paused);
+
+PULSAR_PUBLIC int pulsar_consumer_configuration_is_start_paused(
+pulsar_consumer_configuration_t *consumer_configuration);
+
 /**
  * Set batch receive policy.
  *
diff --git a/lib/ConsumerConfiguration.cc b/lib/ConsumerConfiguration.cc
index 044518a..9648278 100644
--- a/lib/ConsumerConfiguration.cc
+++ b/lib/ConsumerConfiguration.cc
@@ -317,6 +317,13 @@ ConsumerConfiguration& 
ConsumerConfiguration::setAckReceiptEnabled(bool ackRecei
 
 bool ConsumerConfiguration::isAckReceiptEnabled() const { return 
impl_->ackReceiptEnabled; }
 
+ConsumerConfiguration& ConsumerConfiguration::setStartPaused(bool startPaused) 
{
+impl_->startPaused = startPaused;
+return *this;
+}
+
+bool ConsumerConfiguration::isStartPaused() const { return impl_->startPaused; 
}
+
 ConsumerConfiguration& ConsumerConfiguration::setRegexSubscriptionMode(
 RegexSubscriptionMode regexSubscriptionMode) {
 impl_->regexSubscriptionMode = regexSubscriptionMode;
diff --git a/lib/ConsumerConfigurationImpl.h b/lib/ConsumerConfigurationImpl.h
index 20a1dae..54e4599 100644
--- a/lib/ConsumerConfigurationImpl.h
+++ b/lib/ConsumerConfigurationImpl.h
@@ -62,6 +62,7 @@ struct ConsumerConfigurationImpl {
 bool batchIndexAckEnabled{false};
 std::vector interceptors;
 bool ackReceiptEnabled{false};
+bool startPaused{false};
 };
 }  // namespace pulsar
 #endif /* LIB_CONSUMERCONFIGURATIONIMPL_H_ */
diff --git a/lib/ConsumerImpl.cc b/lib/ConsumerImpl.cc
index ebc8518..7d5250e 100644
--- a/lib/ConsumerImpl.cc
+++ b/lib/ConsumerImpl.cc
@@ -88,7 +88,7 @@ ConsumerImpl::ConsumerImpl(const ClientImplPtr client, const 
std::string& topic,
   receiverQueueRefillThreshold_(config_.getReceiverQueueSize() / 2),
   consumerId_(client->newConsumerId()),
   consumerStr_("[" + topic + ", " + subscriptionName + ", " + 
std::to_string(consumerId_) + "] "),
-  messageListenerRunning_(true),
+  messageListenerRunning_(!conf.isStartPaused()),
   negativeAcksTracker_(std::make_shared(client, 
*this, conf)),
   readCompacted_(conf.isReadCompacted()),
   startMessageId_(startMessageId),
diff --git a/lib/c/c_ConsumerConfiguration.cc b/lib/c/c_ConsumerConfiguration.cc
index

svn commit: r67896 [2/2] - in /dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2: ./ apk-arm64/ apk-arm64/aarch64/ apk-x86_64/ apk-x86_64/x86_64/ deb-arm64/ deb-x86_64/ rpm-arm64/ rpm-a

2024-03-11 Thread xyz
Added: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/rpm-x86_64/x86_64/apache-pulsar-client-debuginfo-3.5.0-1.x86_64.rpm.sha512
==
--- 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/rpm-x86_64/x86_64/apache-pulsar-client-debuginfo-3.5.0-1.x86_64.rpm.sha512
 (added)
+++ 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/rpm-x86_64/x86_64/apache-pulsar-client-debuginfo-3.5.0-1.x86_64.rpm.sha512
 Tue Mar 12 02:20:34 2024
@@ -0,0 +1 @@
+193f9ebab6761fcade425f726063a115b7a997b1e83c4e013f9b39e1bbbf1172f135cbf20fc9f9e55bf20509f2d1af0d5b3764c4f32b38314656313b64ea44e7
  ./rpm-x86_64/x86_64/apache-pulsar-client-debuginfo-3.5.0-1.x86_64.rpm

Added: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.0-1.x86_64.rpm
==
Binary file - no diff available.

Propchange: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.0-1.x86_64.rpm
--
svn:mime-type = application/octet-stream

Added: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.0-1.x86_64.rpm.asc
==
--- 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.0-1.x86_64.rpm.asc
 (added)
+++ 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.0-1.x86_64.rpm.asc
 Tue Mar 12 02:20:34 2024
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCgAdFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmXvuwgACgkQQrtq+2zS
+b6bRqRAAiVAjFqSCz0HRL4G+LxhIxL85QqvsMppwTEYLdbSk9h+1goUT/DMvFyA0
+I24whjDZTMUytYY9bzg3iNDYP9SuwZ3WPWadh5yxZIGa84KcWT9bQnlZS1hwlc/o
+gBNXP0xmQ8YR/njMzbSkU2dbg+w5Cq/u/N/ciUsinXgv4lia675TZ/myUVm9sXHp
+XqLB/sUlrfTYxePb2kYCaBNs46/Pk9xg6gpMRJnQWTJI7VFsvMZI8mAfPqZiYaJD
+CvbMFKiW8Ap2AASNHfaB/3QKoxmJOVIYT7xmjddLuxIw42vHqe5gb64O33qIwOgK
+rBL/jQf3mO/RShYvVZInaADAWSRxHjXEfIp+FGedGMFgyiq6LKxcDqqgT2/7+20O
+/52SWoXzDAq77Sfg6ihOr2pDLQXIfmvvAsqPrfWBJqbzClzpHvHpxC7C8jqFYH4z
+fAqlubeNXrcpAVYaK7M1jk9byvsIj02TEIVr8iebdeJBt8y1+jiDkuFenhK+KE9n
+1D7mV/KN15iJ/fp7OmGdffczUaqwRxwdB3YrlDAQD3aF1AO5oqs5DxkgVDBxlchB
+cdKVwJgokABsWJ7C0hAUJX0ZihYS7iKEdx4HFEkz/lnOKz0T75OBHDBjZK3usyBQ
+Oz1B3R0SDcVDOUX4/iMXiskqX9efwtyBArTNz9qiYW9+31XsCwM=
+=jbo9
+-END PGP SIGNATURE-

Added: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.0-1.x86_64.rpm.sha512
==
--- 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.0-1.x86_64.rpm.sha512
 (added)
+++ 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.0-1.x86_64.rpm.sha512
 Tue Mar 12 02:20:34 2024
@@ -0,0 +1 @@
+55b51876fc68683aff47fec8867c3c914dcdd9ebe875ad61088baab2c55362696964f6c5f2e6beb2f9443fb60668c3773aa6f934b6d720afeeeb54316ba14d68
  ./rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.0-1.x86_64.rpm

Added: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/rpm-x86_64/x86_64/repodata/46236f6d11e5d3bf2fe4375d738b8786e45ef69edb3d488cb785067c99b7aea8-filelists.xml.gz
==
Binary file - no diff available.

Propchange: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/rpm-x86_64/x86_64/repodata/46236f6d11e5d3bf2fe4375d738b8786e45ef69edb3d488cb785067c99b7aea8-filelists.xml.gz
--
svn:mime-type = application/octet-stream

Added: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/rpm-x86_64/x86_64/repodata/46236f6d11e5d3bf2fe4375d738b8786e45ef69edb3d488cb785067c99b7aea8-filelists.xml.gz.asc
==
--- 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/rpm-x86_64/x86_64/repodata/46236f6d11e5d3bf2fe4375d738b8786e45ef69edb3d488cb785067c99b7aea8-filelists.xml.gz.asc
 (added)
+++ 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/rpm-x86_64/x86_64/repodata/46236f6d11e5d3bf2fe4375d738b8786e45ef69edb3d488cb785067c99b7aea8-filelists.xml.gz.asc
 Tue Mar 12 02:20:34 2024
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCgAdFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmXvuwkACgkQQrtq+2zS
+b6boyxAAi12kbMRjGtML8idiUe0XjsVQ5k2zlA02Q2BjL87mwuBT3dShxcRvc48c
+RbJPyTDQS4Ekl+FPO2TJebfVLcH9DRyebe40zYkeDM2zxFvJl2VyoJkWZq1EEHcc

svn commit: r67896 [1/2] - in /dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2: ./ apk-arm64/ apk-arm64/aarch64/ apk-x86_64/ apk-x86_64/x86_64/ deb-arm64/ deb-x86_64/ rpm-arm64/ rpm-a

2024-03-11 Thread xyz
Author: xyz
Date: Tue Mar 12 02:20:34 2024
New Revision: 67896

Log:
Staging artifacts and signature for Pulsar Client C++ release 3.5.0

Added:
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apache-pulsar-client-cpp-3.5.0.tar.gz
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apache-pulsar-client-cpp-3.5.0.tar.gz.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apache-pulsar-client-cpp-3.5.0.tar.gz.sha512
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-arm64/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-arm64/aarch64/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-arm64/aarch64/APKINDEX.tar.gz
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-arm64/aarch64/APKINDEX.tar.gz.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-arm64/aarch64/APKINDEX.tar.gz.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-arm64/aarch64/apache-pulsar-client-3.5.0-r0.apk
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-arm64/aarch64/apache-pulsar-client-3.5.0-r0.apk.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-arm64/aarch64/apache-pulsar-client-3.5.0-r0.apk.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-arm64/aarch64/apache-pulsar-client-dev-3.5.0-r0.apk
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-arm64/aarch64/apache-pulsar-client-dev-3.5.0-r0.apk.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-arm64/aarch64/apache-pulsar-client-dev-3.5.0-r0.apk.sha512
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-x86_64/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-x86_64/x86_64/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-x86_64/x86_64/APKINDEX.tar.gz
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-x86_64/x86_64/APKINDEX.tar.gz.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-x86_64/x86_64/APKINDEX.tar.gz.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-x86_64/x86_64/apache-pulsar-client-3.5.0-r0.apk
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-x86_64/x86_64/apache-pulsar-client-3.5.0-r0.apk.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-x86_64/x86_64/apache-pulsar-client-3.5.0-r0.apk.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-x86_64/x86_64/apache-pulsar-client-dev-3.5.0-r0.apk
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-x86_64/x86_64/apache-pulsar-client-dev-3.5.0-r0.apk.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/apk-x86_64/x86_64/apache-pulsar-client-dev-3.5.0-r0.apk.sha512
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/deb-arm64/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/deb-arm64/Packages.gz
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/deb-arm64/Packages.gz.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/deb-arm64/Packages.gz.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/deb-arm64/apache-pulsar-client-dev.deb
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/deb-arm64/apache-pulsar-client-dev.deb.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/deb-arm64/apache-pulsar-client-dev.deb.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/deb-arm64/apache-pulsar-client.deb
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/deb-arm64/apache-pulsar-client.deb.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/deb-arm64/apache-pulsar-client.deb.sha512
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/deb-x86_64/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/deb-x86_64/Packages.gz
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/deb-x86_64/Packages.gz.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/deb-x86_64/Packages.gz.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/deb-x86_64/apache-pulsar-client-dev.deb
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/deb-x86_64/apache-pulsar-client-dev.deb.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-2/deb-x86_64/apache-pulsar-client

(pulsar-client-cpp) annotated tag v3.5.0-candidate-2 updated (916af95 -> 4956803)

2024-03-11 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to annotated tag v3.5.0-candidate-2
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


*** WARNING: tag v3.5.0-candidate-2 was modified! ***

from 916af95  (commit)
  to 4956803  (tag)
 tagging 916af95dda4d06162f9ea4e4180f9fd726c25a4e (commit)
 replaces v3.5.0-candidate-1
  by Yunze Xu
  on Mon Mar 11 19:32:39 2024 +0800

- Log -
Release v3.5.0-candidate-2
-BEGIN PGP SIGNATURE-

iQJDBAABCgAtFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmXu69cPHHh5ekBhcGFj
aGUub3JnAAoJEEK7avts0m+mYVMQALe6K1j5wPmd5319SIHyu0GSbGHvlgE/o3tz
qmEkxu+x2DpgtoHPGo2fLof70kn4wXSAgkMKOpbulnNzQMklIKQ1xBH8VSjxiwbC
nkAJOTw4g2OsMoEDpmIJzTW3VMQ9uJfS3RtpzQlNt1r7cS5DVSn9y3A9QKTtAV8Q
F8dLGb1qIxk8G4jf10tBzEFVqCTubOUKlhflDGf8HlNdGJ0i2tfbFg8l35LXEXOA
H2fhpWVwLrN1gLGC9/hWkZSkoCutVsgGOVxesFGc+++V2kBADQuQS6capzGFEmbN
XZRu0uQ6WIlVQIkDnHGX5z708z4rp4Cy0CXHwRqP4H0VkXWcatb4W2zsGMqNSeC2
F8qn2RgXM0NaHw2E55x4128AfSWGGvef8r5KRQbJZi1oiGxAqJjPpeIocHoXw5Qh
ZQXNlbPssS+3KALe/dWich3QTHjkM9EgQaDFhUiSkGJzRQ047ifnEiENbKeB0xDZ
cWREbJW27vn8AHfOVGH9X5ap3dLReLOdsOd4NJIJw0DlHznQ6Furs+UNs+ah1JsD
AyK+f8MsJ9wMnioCUfMP0GamiifaCWniCspOBWJNKMiOIe9OvKQ/j6kWWNlYDDUu
wUDn7G6DOLupJw2X2fFAlkN5jzRHbszJpnFhIzXCe3mSo4OzkhVV61fKqa09e0b9
/KnDK2KY
=uA3U
-END PGP SIGNATURE-
---


No new revisions were added by this update.

Summary of changes:



(pulsar-client-cpp) branch branch-3.5 updated (3b574c7 -> 916af95)

2024-03-11 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


from 3b574c7  Release 3.5.0
 add e2cacb7  Fix the incompatibility with Clang and C++20 (#408)
 add d0a3227  [improve] add physicalAddress as part of connection pool key 
(#411)
 add 747c186  [CI] Pin the clang-format version to 11 (#412)
 add 4360500  Change return code of MultiTopicsConsumerImpl::closeAsync 
after unsubscribe or close (#413)
 add ee1d7b9  Fix hasMessageAvailable might return true after seeking to 
latest (#409)
 new 916af95  Merge branch 'main' into branch-3.5

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/ci-pr-validation.yaml | 26 --
 lib/ClientConnection.cc |  2 +-
 lib/ConnectionPool.cc   | 15 --
 lib/ConnectionPool.h|  3 +-
 lib/ConsumerImpl.cc | 87 +++--
 lib/ConsumerImpl.h  | 31 +++-
 lib/MultiTopicsConsumerImpl.cc  |  4 +-
 lib/NamespaceName.cc|  2 +-
 lib/NamespaceName.h |  2 +-
 lib/Synchronized.h  |  5 ++
 lib/TopicName.cc|  2 +-
 lib/TopicName.h |  2 +-
 tests/BasicEndToEndTest.cc  |  2 +-
 tests/ReaderTest.cc | 55 +
 14 files changed, 183 insertions(+), 55 deletions(-)



(pulsar-client-cpp) 01/01: Merge branch 'main' into branch-3.5

2024-03-11 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git

commit 916af95dda4d06162f9ea4e4180f9fd726c25a4e
Merge: 3b574c7 ee1d7b9
Author: Yunze Xu 
AuthorDate: Mon Mar 11 19:30:58 2024 +0800

Merge branch 'main' into branch-3.5

 .github/workflows/ci-pr-validation.yaml | 26 --
 lib/ClientConnection.cc |  2 +-
 lib/ConnectionPool.cc   | 15 --
 lib/ConnectionPool.h|  3 +-
 lib/ConsumerImpl.cc | 87 +++--
 lib/ConsumerImpl.h  | 31 +++-
 lib/MultiTopicsConsumerImpl.cc  |  4 +-
 lib/NamespaceName.cc|  2 +-
 lib/NamespaceName.h |  2 +-
 lib/Synchronized.h  |  5 ++
 lib/TopicName.cc|  2 +-
 lib/TopicName.h |  2 +-
 tests/BasicEndToEndTest.cc  |  2 +-
 tests/ReaderTest.cc | 55 +
 14 files changed, 183 insertions(+), 55 deletions(-)



svn commit: r67877 - /dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/

2024-03-11 Thread xyz
Author: xyz
Date: Mon Mar 11 11:28:47 2024
New Revision: 67877

Log:
Delete pulsar-client-cpp 3.5.0 candidate 1

Removed:
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/



(pulsar-client-cpp) branch main updated: Fix hasMessageAvailable might return true after seeking to latest (#409)

2024-03-11 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


The following commit(s) were added to refs/heads/main by this push:
 new ee1d7b9  Fix hasMessageAvailable might return true after seeking to 
latest (#409)
ee1d7b9 is described below

commit ee1d7b9c5b1eed6fe0a279203648a06c30a3feb0
Author: Yunze Xu 
AuthorDate: Mon Mar 11 19:09:18 2024 +0800

Fix hasMessageAvailable might return true after seeking to latest (#409)

* ### Motivation

After a seek operation is done, the `startMessageId` will be updated
until the reconnection due to the seek is done in `connectionOpened`.
So before it's updated, `hasMessageAvailable` could compare with an
outdated `startMessageId` and return a wrong value.

### Modifications

Replace `duringSeek` with a `SeekStatus` field:
- `NOT_STARTED`: initial, or a seek operation is done. `seek` could only 
succeed in this status.
- `IN_PROGRESS`: A seek operation has started but the client does not 
receive the response from broker.
- `COMPLETED`: The client has received the seek response but the seek 
future is not done.

After the status becomes `COMPLETED`, if the connection is not ready,
next time the connection is established, the status will change from
`COMPLETED` to `NOT_STARTED` and then seek future will be completed
in the internal executor.

Add `testHasMessageAvailableAfterSeekToEnd` and `testSeekInProgress`.
---
 lib/ConsumerImpl.cc | 87 ++---
 lib/ConsumerImpl.h  | 31 +--
 lib/Synchronized.h  |  5 +++
 tests/ReaderTest.cc | 55 +
 4 files changed, 139 insertions(+), 39 deletions(-)

diff --git a/lib/ConsumerImpl.cc b/lib/ConsumerImpl.cc
index fa33e28..ebc8518 100644
--- a/lib/ConsumerImpl.cc
+++ b/lib/ConsumerImpl.cc
@@ -236,16 +236,14 @@ Future ConsumerImpl::connectionOpened(const 
ClientConnectionPtr& c
 // sending the subscribe request.
 cnx->registerConsumer(consumerId_, get_shared_this_ptr());
 
-if (duringSeek_) {
+if (duringSeek()) {
 ackGroupingTrackerPtr_->flushAndClean();
 }
 
 Lock lockForMessageId(mutexForMessageId_);
-// Update startMessageId so that we can discard messages after delivery 
restarts
-const auto startMessageId = clearReceiveQueue();
+clearReceiveQueue();
 const auto subscribeMessageId =
-(subscriptionMode_ == Commands::SubscriptionModeNonDurable) ? 
startMessageId : boost::none;
-startMessageId_ = startMessageId;
+(subscriptionMode_ == Commands::SubscriptionModeNonDurable) ? 
startMessageId_.get() : boost::none;
 lockForMessageId.unlock();
 
 unAckedMessageTrackerPtr_->clear();
@@ -1048,14 +1046,21 @@ void ConsumerImpl::messageProcessed(Message& msg, bool 
track) {
  * Clear the internal receiver queue and returns the message id of what was 
the 1st message in the queue that
  * was
  * not seen by the application
+ * `startMessageId_` is updated so that we can discard messages after delivery 
restarts.
  */
-boost::optional ConsumerImpl::clearReceiveQueue() {
-bool expectedDuringSeek = true;
-if (duringSeek_.compare_exchange_strong(expectedDuringSeek, false)) {
-return seekMessageId_.get();
+void ConsumerImpl::clearReceiveQueue() {
+if (duringSeek()) {
+startMessageId_ = seekMessageId_.get();
+SeekStatus expected = SeekStatus::COMPLETED;
+if (seekStatus_.compare_exchange_strong(expected, 
SeekStatus::NOT_STARTED)) {
+auto seekCallback = seekCallback_.release();
+executor_->postWork([seekCallback] { seekCallback(ResultOk); });
+}
+return;
 } else if (subscriptionMode_ == Commands::SubscriptionModeDurable) {
-return startMessageId_.get();
+return;
 }
+
 Message nextMessageInQueue;
 if (incomingMessages_.peekAndClear(nextMessageInQueue)) {
 // There was at least one message pending in the queue
@@ -1071,16 +1076,12 @@ boost::optional 
ConsumerImpl::clearReceiveQueue() {
.ledgerId(nextMessageId.ledgerId())
.entryId(nextMessageId.entryId() - 
1)
.build();
-return previousMessageId;
+startMessageId_ = previousMessageId;
 } else if (lastDequedMessageId_ != MessageId::earliest()) {
 // If the queue was empty we need to restart from the message just 
after the last one that has been
 // dequeued
 // in the past
-return lastDequedMessageId_;
-} else {
-// No message was received or dequeued by this consumer. Next message 
would still be the
-// startMessageId
-return startMessageId_.get();
+startMessageId_ = 

(pulsar-client-cpp) branch main updated: Change return code of MultiTopicsConsumerImpl::closeAsync after unsubscribe or close (#413)

2024-03-11 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


The following commit(s) were added to refs/heads/main by this push:
 new 4360500  Change return code of MultiTopicsConsumerImpl::closeAsync 
after unsubscribe or close (#413)
4360500 is described below

commit 436050092930b3eca73883cc7623f8cebf08f636
Author: Masahiro Sakamoto 
AuthorDate: Mon Mar 11 15:46:13 2024 +0900

Change return code of MultiTopicsConsumerImpl::closeAsync after unsubscribe 
or close (#413)

Fixes #88

### Motivation

https://github.com/apache/pulsar-client-cpp/pull/338 fixed 
`ConsumerImpl::closeAsync` so that closing after it was already closed or 
unsubscribed returns `ResultOk` instead of `ResultAlreadyClosed`. However, 
`MultiTopicsConsumerImpl::closeAsync` still returns `ResultAlreadyClosed`. This 
seems to be a change omission.
---
 lib/MultiTopicsConsumerImpl.cc | 4 ++--
 tests/BasicEndToEndTest.cc | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/MultiTopicsConsumerImpl.cc b/lib/MultiTopicsConsumerImpl.cc
index a0854cf..1484785 100644
--- a/lib/MultiTopicsConsumerImpl.cc
+++ b/lib/MultiTopicsConsumerImpl.cc
@@ -475,7 +475,7 @@ void MultiTopicsConsumerImpl::closeAsync(ResultCallback 
originalCallback) {
 };
 const auto state = state_.load();
 if (state == Closing || state == Closed) {
-callback(ResultAlreadyClosed);
+callback(ResultOk);
 return;
 }
 
@@ -488,7 +488,7 @@ void MultiTopicsConsumerImpl::closeAsync(ResultCallback 
originalCallback) {
 if (consumers.empty()) {
 LOG_DEBUG("TopicsConsumer have no consumers to close "
   << " topic" << topic() << " subscription - " << 
subscriptionName_);
-callback(ResultAlreadyClosed);
+callback(ResultOk);
 return;
 }
 
diff --git a/tests/BasicEndToEndTest.cc b/tests/BasicEndToEndTest.cc
index 5dbccbf..42c072a 100644
--- a/tests/BasicEndToEndTest.cc
+++ b/tests/BasicEndToEndTest.cc
@@ -1694,7 +1694,7 @@ TEST(BasicEndToEndTest, testSeekOnPartitionedTopic) {
 ASSERT_EQ(expected.str(), msgReceived.getDataAsString());
 ASSERT_EQ(ResultOk, consumer.acknowledge(msgReceived));
 ASSERT_EQ(ResultOk, consumer.unsubscribe());
-ASSERT_EQ(ResultAlreadyClosed, consumer.close());
+ASSERT_EQ(ResultOk, consumer.close());
 ASSERT_EQ(ResultOk, producer.close());
 ASSERT_EQ(ResultOk, client.close());
 }



(pulsar-client-go) branch master updated: Remove `VERSION` and `stable.txt` files (#1158)

2024-03-06 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-go.git


The following commit(s) were added to refs/heads/master by this push:
 new 6d9cbd8b Remove `VERSION` and `stable.txt` files (#1158)
6d9cbd8b is described below

commit 6d9cbd8ba3aa08b5285cceb0a4688dad57ae3171
Author: Zike Yang 
AuthorDate: Wed Mar 6 19:20:55 2024 +0800

Remove `VERSION` and `stable.txt` files (#1158)

### Motivation

We currently have two hardcoded version files in place: `VERSION` which 
represents the current version and `stable.txt` which represents the current 
stable version. However, I'm curious about the intended function of these 
files. Are they merely for developers to conveniently reference the current and 
stable versions? And what is our approach to managing these files? For 
instance, how do we determine what constitutes a stable version? If there's no 
compelling reason to keep these file [...]

Please see more discussion here: 
https://lists.apache.org/thread/mrntb1y7ws173ohtdvz1v8q86pg50cn2

### Modifications

- Remove `VERSION` and `stable.txt` files.
---
 VERSION | 3 ---
 docs/release-process.md | 4 +---
 stable.txt  | 3 ---
 3 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/VERSION b/VERSION
deleted file mode 100644
index 725659e7..
--- a/VERSION
+++ /dev/null
@@ -1,3 +0,0 @@
-// This version number refers to the currently released version number
-// Please fix the version when release.
-v0.12.0
diff --git a/docs/release-process.md b/docs/release-process.md
index 0832f17a..ab99ed67 100644
--- a/docs/release-process.md
+++ b/docs/release-process.md
@@ -35,9 +35,7 @@ cd pulsar-client-go
 git checkout -b branch-0.X.0 origin/master
 ```
 
-2. Update the version and tag of a package.
-
-Update the information of the new release to the `VERSION` file and 
`stable.txt` file and send a PR for requesting the changes.
+2. Create a tag for the release candidate.
 
 During the release process, you can create a "candidate" tag which will get 
promoted to the "real" final tag after verification and approval.
 
diff --git a/stable.txt b/stable.txt
deleted file mode 100644
index 8a5f2e8d..
--- a/stable.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-// This version number refers to the current stable version, generally is 
`VERSION - 1`.
-// Please fix the version when release.
-v0.12.0
\ No newline at end of file



(pulsar-client-cpp) branch main updated: [CI] Pin the clang-format version to 11 (#412)

2024-03-04 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


The following commit(s) were added to refs/heads/main by this push:
 new 747c186  [CI] Pin the clang-format version to 11 (#412)
747c186 is described below

commit 747c1863018cb345b4e2bbbaaf7a6549c9c6b429
Author: Yunze Xu 
AuthorDate: Tue Mar 5 12:35:52 2024 +0800

[CI] Pin the clang-format version to 11 (#412)

### Motivation

The `clang-format` tool on `ubuntu:22.04` runner was upgraded to 14
recently, whose rule is slightly different from 11.

### Modifications

Use clang-format-action for code format check and specify the
version to 11.
---
 .github/workflows/ci-pr-validation.yaml | 19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/ci-pr-validation.yaml 
b/.github/workflows/ci-pr-validation.yaml
index 61134aa..d9dc2ca 100644
--- a/.github/workflows/ci-pr-validation.yaml
+++ b/.github/workflows/ci-pr-validation.yaml
@@ -29,8 +29,20 @@ concurrency:
 
 jobs:
 
+  formatting-check:
+name: Formatting Check
+runs-on: ubuntu-latest
+steps:
+- uses: actions/checkout@v3
+- name: Run clang-format style check for C/C++/Protobuf programs.
+  uses: jidicula/clang-format-action@v4.11.0
+  with:
+clang-format-version: '11'
+exclude-regex: '.*\.(proto|hpp)'
+
   wireshark-dissector-build:
 name: Build the Wireshark dissector
+needs: formatting-check
 runs-on: ${{ matrix.os }}
 timeout-minutes: 60
 strategy:
@@ -61,6 +73,7 @@ jobs:
 
   unit-tests:
 name: Run unit tests
+needs: formatting-check
 runs-on: ubuntu-22.04
 timeout-minutes: 120
 
@@ -81,8 +94,8 @@ jobs:
   ./vcpkg/vcpkg format-manifest vcpkg.json
   if [[ $(git diff | wc -l) -gt 0 ]]; then
   echo "Please run `./vcpkg/vcpkg format-manifest vcpkg.json` to 
reformat vcpkg.json"
+  exit 1
   fi
-  make check-format
 
   - name: Build tests
 run: |
@@ -103,6 +116,7 @@ jobs:
 
   cpp20-build:
 name: Build with the C++20 standard
+needs: formatting-check
 runs-on: ubuntu-22.04
 timeout-minutes: 60
 
@@ -288,6 +302,7 @@ jobs:
   cpp-build-macos:
 timeout-minutes: 120
 name: Build CPP Client on macOS
+needs: formatting-check
 runs-on: macos-12
 steps:
   - name: checkout
@@ -337,7 +352,7 @@ jobs:
   check-completion:
 name: Check Completion
 runs-on: ubuntu-latest
-needs: [wireshark-dissector-build, unit-tests, cpp20-build, 
cpp-build-windows, package, cpp-build-macos]
+needs: [formatting-check, wireshark-dissector-build, unit-tests, 
cpp20-build, cpp-build-windows, package, cpp-build-macos]
 
 steps:
   - run: true



(pulsar-client-cpp) branch main updated: [improve] add physicalAddress as part of connection pool key (#411)

2024-03-04 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


The following commit(s) were added to refs/heads/main by this push:
 new d0a3227  [improve] add physicalAddress as part of connection pool key 
(#411)
d0a3227 is described below

commit d0a322704cea8dba5925d5e3760061bdc0d84282
Author: Heesung Sohn <103456639+heesung...@users.noreply.github.com>
AuthorDate: Mon Mar 4 18:28:08 2024 -0800

[improve] add physicalAddress as part of connection pool key (#411)

### Motivation

Context: https://github.com/apache/pulsar/pull/22085/files#r1497008116

Currently, the connection pool key does not include physicalAddress 
(currently logicalAddress + keySuffix). This can be a problem when the same 
logicalAddresses are in the migrated(green) cluster. (the connection pool will 
return the connection to the old(blue) cluster)

### Modifications

Add physicalAddress as part of the connection pool key
---
 lib/ClientConnection.cc |  2 +-
 lib/ConnectionPool.cc   | 15 +++
 lib/ConnectionPool.h|  3 ++-
 3 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/lib/ClientConnection.cc b/lib/ClientConnection.cc
index abd38b4..04202d3 100644
--- a/lib/ClientConnection.cc
+++ b/lib/ClientConnection.cc
@@ -1321,7 +1321,7 @@ void ClientConnection::close(Result result, bool detach) {
 }
 // Remove the connection from the pool before completing any promise
 if (detach) {
-pool_.remove(logicalAddress_ + "-" + std::to_string(poolIndex_), this);
+pool_.remove(logicalAddress_, physicalAddress_, poolIndex_, this);
 }
 
 auto self = shared_from_this();
diff --git a/lib/ConnectionPool.cc b/lib/ConnectionPool.cc
index 4cc8883..9a614ed 100644
--- a/lib/ConnectionPool.cc
+++ b/lib/ConnectionPool.cc
@@ -66,6 +66,13 @@ bool ConnectionPool::close() {
 return true;
 }
 
+static const std::string getKey(const std::string& logicalAddress, const 
std::string& physicalAddress,
+size_t keySuffix) {
+std::stringstream ss;
+ss << logicalAddress << '-' << physicalAddress << '-' << keySuffix;
+return ss.str();
+}
+
 Future 
ConnectionPool::getConnectionAsync(const std::string& logicalAddress,

const std::string& physicalAddress,

size_t keySuffix) {
@@ -77,9 +84,7 @@ Future 
ConnectionPool::getConnectionAsync(const
 
 std::unique_lock lock(mutex_);
 
-std::stringstream ss;
-ss << logicalAddress << '-' << keySuffix;
-const std::string key = ss.str();
+auto key = getKey(logicalAddress, physicalAddress, keySuffix);
 
 PoolMap::iterator cnxIt = pool_.find(key);
 if (cnxIt != pool_.end()) {
@@ -127,7 +132,9 @@ Future 
ConnectionPool::getConnectionAsync(const
 return future;
 }
 
-void ConnectionPool::remove(const std::string& key, ClientConnection* value) {
+void ConnectionPool::remove(const std::string& logicalAddress, const 
std::string& physicalAddress,
+size_t keySuffix, ClientConnection* value) {
+auto key = getKey(logicalAddress, physicalAddress, keySuffix);
 std::lock_guard lock(mutex_);
 auto it = pool_.find(key);
 if (it != pool_.end() && it->second.get() == value) {
diff --git a/lib/ConnectionPool.h b/lib/ConnectionPool.h
index a51205b..e044d62 100644
--- a/lib/ConnectionPool.h
+++ b/lib/ConnectionPool.h
@@ -51,7 +51,8 @@ class PULSAR_PUBLIC ConnectionPool {
  */
 bool close();
 
-void remove(const std::string& key, ClientConnection* value);
+void remove(const std::string& logicalAddress, const std::string& 
physicalAddress, size_t keySuffix,
+ClientConnection* value);
 
 /**
  * Get a connection from the pool.



(pulsar-client-cpp) branch main updated: Fix the incompatibility with Clang and C++20 (#408)

2024-03-03 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


The following commit(s) were added to refs/heads/main by this push:
 new e2cacb7  Fix the incompatibility with Clang and C++20 (#408)
e2cacb7 is described below

commit e2cacb7dfb57b6d059b49fead2e1611548ff89b0
Author: Yunze Xu 
AuthorDate: Mon Mar 4 01:24:09 2024 +0800

Fix the incompatibility with Clang and C++20 (#408)

### Motivation

When I built with Clang and C++20, there were the following errors:

> ISO C++20 considers use of overloaded operator '==' (with operand types 
'pulsar::NamespaceName' and 'pulsar::NamespaceName') to be ambiguous despite 
there being a unique best viable function 
[-Werror,-Wambiguous-reversed-operator]

See the detailed answer here: 
https://stackoverflow.com/questions/60386792/c20-comparison-warning-about-ambiguous-reversed-operator

### Modifications

Make the member functions of `operator=` const in `TopicName` and 
`NamespaceName` and add a workflow to cover this case.
---
 .github/workflows/ci-pr-validation.yaml | 7 ++-
 lib/NamespaceName.cc| 2 +-
 lib/NamespaceName.h | 2 +-
 lib/TopicName.cc| 2 +-
 lib/TopicName.h | 2 +-
 5 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/ci-pr-validation.yaml 
b/.github/workflows/ci-pr-validation.yaml
index 56309e9..61134aa 100644
--- a/.github/workflows/ci-pr-validation.yaml
+++ b/.github/workflows/ci-pr-validation.yaml
@@ -289,7 +289,6 @@ jobs:
 timeout-minutes: 120
 name: Build CPP Client on macOS
 runs-on: macos-12
-needs: unit-tests
 steps:
   - name: checkout
 uses: actions/checkout@v3
@@ -306,6 +305,12 @@ jobs:
 run: |
   cmake --build ./build-macos --parallel --config Release
 
+  - name: Build with C++20
+shell: bash
+run: |
+  cmake -B build-macos-cpp20 -DCMAKE_CXX_STANDARD=20
+  cmake --build build-macos-cpp20 -j8
+
   cpp-build-macos-static:
 timeout-minutes: 120
 name: Build CPP Client on macOS with static dependencies
diff --git a/lib/NamespaceName.cc b/lib/NamespaceName.cc
index f493db2..d635480 100644
--- a/lib/NamespaceName.cc
+++ b/lib/NamespaceName.cc
@@ -93,7 +93,7 @@ std::shared_ptr 
NamespaceName::getNamespaceObject() {
 return std::shared_ptr(this);
 }
 
-bool NamespaceName::operator==(const NamespaceName& namespaceName) {
+bool NamespaceName::operator==(const NamespaceName& namespaceName) const {
 return this->namespace_.compare(namespaceName.namespace_) == 0;
 }
 
diff --git a/lib/NamespaceName.h b/lib/NamespaceName.h
index ce451a2..d1f5765 100644
--- a/lib/NamespaceName.h
+++ b/lib/NamespaceName.h
@@ -37,7 +37,7 @@ class PULSAR_PUBLIC NamespaceName : public ServiceUnitId {
 static std::shared_ptr get(const std::string& property, 
const std::string& cluster,
   const std::string& 
namespaceName);
 static std::shared_ptr get(const std::string& property, 
const std::string& namespaceName);
-bool operator==(const NamespaceName& namespaceName);
+bool operator==(const NamespaceName& namespaceName) const;
 bool isV2();
 std::string toString();
 
diff --git a/lib/TopicName.cc b/lib/TopicName.cc
index 5b892fc..487eee5 100644
--- a/lib/TopicName.cc
+++ b/lib/TopicName.cc
@@ -164,7 +164,7 @@ std::string TopicName::getLocalName() { return localName_; }
 
 std::string TopicName::getEncodedLocalName() const { return 
getEncodedName(localName_); }
 
-bool TopicName::operator==(const TopicName& other) {
+bool TopicName::operator==(const TopicName& other) const {
 return (this->topicName_.compare(other.topicName_) == 0);
 }
 
diff --git a/lib/TopicName.h b/lib/TopicName.h
index 8cc9cb5..bee8138 100644
--- a/lib/TopicName.h
+++ b/lib/TopicName.h
@@ -65,7 +65,7 @@ class PULSAR_PUBLIC TopicName : public ServiceUnitId {
 NamespaceNamePtr getNamespaceName();
 int getPartitionIndex() const noexcept { return partition_; }
 static std::shared_ptr get(const std::string& topicName);
-bool operator==(const TopicName& other);
+bool operator==(const TopicName& other) const;
 static std::string getEncodedName(const std::string& nameBeforeEncoding);
 static std::string removeDomain(const std::string& topicName);
 static bool containsDomain(const std::string& topicName);



svn commit: r67640 [2/2] - in /dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1: ./ apk-arm64/ apk-arm64/aarch64/ apk-x86_64/ apk-x86_64/x86_64/ deb-arm64/ deb-x86_64/ rpm-arm64/ rpm-a

2024-02-29 Thread xyz
Added: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-debuginfo-3.5.0-1.x86_64.rpm.sha512
==
--- 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-debuginfo-3.5.0-1.x86_64.rpm.sha512
 (added)
+++ 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-debuginfo-3.5.0-1.x86_64.rpm.sha512
 Fri Mar  1 06:39:32 2024
@@ -0,0 +1 @@
+cb1c1067b165da0d9ddbaa77b20a6f4a0524f3403e77f81cbc574be5d53f849bb65b08b40776e7bab3e35ad124f78760ed61631e961ae8f9f4f704c2af397848
  ./rpm-x86_64/x86_64/apache-pulsar-client-debuginfo-3.5.0-1.x86_64.rpm

Added: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.0-1.x86_64.rpm
==
Binary file - no diff available.

Propchange: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.0-1.x86_64.rpm
--
svn:mime-type = application/octet-stream

Added: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.0-1.x86_64.rpm.asc
==
--- 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.0-1.x86_64.rpm.asc
 (added)
+++ 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.0-1.x86_64.rpm.asc
 Fri Mar  1 06:39:32 2024
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCgAdFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmXhd20ACgkQQrtq+2zS
+b6bxnRAAt5El0M52VN6GeKvwdusyVX/eWltr2G8ccfbGjv0uKSq+ginBkNyG6pWs
+TizsgWaN6OLS85j9kIOisqmEIGKGkjJENGx6SrJMYOSlTbreDF7gEiXOlWNaXv4F
+KpsLO01/B6fw/x2Zm0JSbEn0QI/77nKBOhG77t+fWRPJWSBvKysi3amFnpGjGfSd
+9BoKpWgcL9+MiKeySxxcC6LAA9L5zm6xWhVY5pX/UovkAqAoqb+GKJ6xKkbLZrZ1
+KfvaaJLHh2r4F+WIYKnpdHxQ1dxdJ8+A1QTrka2aYkNTvRoSBDudkx5kyY9J57Y+
+yNHy5UJRaaB+6r1J2tJP9L6hVFmRyQVLxLaB3XdOJCXmZwxK8Su8wESSj+1LKXc6
+wI6Ngy5o2YDIl7ZgkseBhyfspNNZTwESaIj6R7psrnQmOMli7GwLMtt28BaHW4TK
+YZ0riMKIn4lQfVU5367JrPEZRFem/Wsos84u95A/cWlMBWav7XYOKPvDvsaM5NzO
+FOBIQ1V7A262Awn4c1beblA81aZ6EMsuzZiyNhuHXsQ7g9EU5J3ZkZK+gfm+AytP
+sX5ndLX+xavO38zogt/BBFXLIu3KrlLAdpz+dKbl/Ajw6wTzKBl4HBdUp4gPWBw8
+/G4abVdSvahwl2usRw75yOTF+WF0IZ6DzCYDGSy2UFv3Xtrza6M=
+=5gB+
+-END PGP SIGNATURE-

Added: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.0-1.x86_64.rpm.sha512
==
--- 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.0-1.x86_64.rpm.sha512
 (added)
+++ 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.0-1.x86_64.rpm.sha512
 Fri Mar  1 06:39:32 2024
@@ -0,0 +1 @@
+74a6873df8fa5fe0bead0ee910403665e15fb3c7137b1c69a52160c68ce75d46cc5b59796982949814ee59e29f4f47cb4672606c6d583a5fd86571f5bd1f3989
  ./rpm-x86_64/x86_64/apache-pulsar-client-devel-3.5.0-1.x86_64.rpm

Added: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/rpm-x86_64/x86_64/repodata/323684d7be42237e53356831748dac1f3319161404be13e8f70d62b5280c3ded-filelists.xml.gz
==
Binary file - no diff available.

Propchange: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/rpm-x86_64/x86_64/repodata/323684d7be42237e53356831748dac1f3319161404be13e8f70d62b5280c3ded-filelists.xml.gz
--
svn:mime-type = application/octet-stream

Added: 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/rpm-x86_64/x86_64/repodata/323684d7be42237e53356831748dac1f3319161404be13e8f70d62b5280c3ded-filelists.xml.gz.asc
==
--- 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/rpm-x86_64/x86_64/repodata/323684d7be42237e53356831748dac1f3319161404be13e8f70d62b5280c3ded-filelists.xml.gz.asc
 (added)
+++ 
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/rpm-x86_64/x86_64/repodata/323684d7be42237e53356831748dac1f3319161404be13e8f70d62b5280c3ded-filelists.xml.gz.asc
 Fri Mar  1 06:39:32 2024
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCgAdFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmXhd24ACgkQQrtq+2zS
+b6YO/g/9GlKwljHk3KBWdL8LGp8no5VTu77C2dBSNsFvkhL3KvVpKcCbopRKOfju
+g2r4NbOFskpRzDhk9JWuKT3j20tH9lDogJ/BFPlNONh/EMFQagVja3w/8iH4a2Bd

svn commit: r67640 [1/2] - in /dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1: ./ apk-arm64/ apk-arm64/aarch64/ apk-x86_64/ apk-x86_64/x86_64/ deb-arm64/ deb-x86_64/ rpm-arm64/ rpm-a

2024-02-29 Thread xyz
Author: xyz
Date: Fri Mar  1 06:39:32 2024
New Revision: 67640

Log:
Staging artifacts and signature for Pulsar Client C++ release 3.5.0

Added:
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apache-pulsar-client-cpp-3.5.0.tar.gz
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apache-pulsar-client-cpp-3.5.0.tar.gz.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apache-pulsar-client-cpp-3.5.0.tar.gz.sha512
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-arm64/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-arm64/aarch64/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-arm64/aarch64/APKINDEX.tar.gz
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-arm64/aarch64/APKINDEX.tar.gz.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-arm64/aarch64/APKINDEX.tar.gz.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-arm64/aarch64/apache-pulsar-client-3.5.0-r0.apk
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-arm64/aarch64/apache-pulsar-client-3.5.0-r0.apk.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-arm64/aarch64/apache-pulsar-client-3.5.0-r0.apk.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-arm64/aarch64/apache-pulsar-client-dev-3.5.0-r0.apk
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-arm64/aarch64/apache-pulsar-client-dev-3.5.0-r0.apk.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-arm64/aarch64/apache-pulsar-client-dev-3.5.0-r0.apk.sha512
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-x86_64/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-x86_64/x86_64/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-x86_64/x86_64/APKINDEX.tar.gz
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-x86_64/x86_64/APKINDEX.tar.gz.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-x86_64/x86_64/APKINDEX.tar.gz.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-x86_64/x86_64/apache-pulsar-client-3.5.0-r0.apk
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-x86_64/x86_64/apache-pulsar-client-3.5.0-r0.apk.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-x86_64/x86_64/apache-pulsar-client-3.5.0-r0.apk.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-x86_64/x86_64/apache-pulsar-client-dev-3.5.0-r0.apk
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-x86_64/x86_64/apache-pulsar-client-dev-3.5.0-r0.apk.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/apk-x86_64/x86_64/apache-pulsar-client-dev-3.5.0-r0.apk.sha512
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/deb-arm64/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/deb-arm64/Packages.gz
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/deb-arm64/Packages.gz.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/deb-arm64/Packages.gz.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/deb-arm64/apache-pulsar-client-dev.deb
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/deb-arm64/apache-pulsar-client-dev.deb.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/deb-arm64/apache-pulsar-client-dev.deb.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/deb-arm64/apache-pulsar-client.deb
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/deb-arm64/apache-pulsar-client.deb.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/deb-arm64/apache-pulsar-client.deb.sha512
dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/deb-x86_64/

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/deb-x86_64/Packages.gz
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/deb-x86_64/Packages.gz.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/deb-x86_64/Packages.gz.sha512

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/deb-x86_64/apache-pulsar-client-dev.deb
   (with props)

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/deb-x86_64/apache-pulsar-client-dev.deb.asc

dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.5.0-candidate-1/deb-x86_64/apache-pulsar-client

(pulsar-client-cpp) annotated tag v3.5.0-candidate-1 updated (3b574c7 -> b677798)

2024-02-29 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to annotated tag v3.5.0-candidate-1
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


*** WARNING: tag v3.5.0-candidate-1 was modified! ***

from 3b574c7  (commit)
  to b677798  (tag)
 tagging 3b574c739e6a62696e0bf2374ab43e7f0b24b377 (commit)
  by Yunze Xu
  on Fri Mar 1 10:39:59 2024 +0800

- Log -
Release v3.5.0-candidate-1
-BEGIN PGP SIGNATURE-

iQJDBAABCgAtFiEEn+m0+KLf1EiRy6J0Qrtq+2zSb6YFAmXhQAAPHHh5ekBhcGFj
aGUub3JnAAoJEEK7avts0m+mylsP/ROlltP3jufRC0AtFzaPtzKYShU8vax9640c
POlBaSgjSJPok6JnWv11Bk2aNaxWcTNfsiTRCALUiRTBwYHKSj5YyXJvBTtmXCSr
2SibpyVxFXiTAAnL7o/cWfktrQ9nJ8Tm8RhqJKFTLXcDqsNgWX1FVZ3PKZZ/35db
CpX3CvQFOiKatZdUdKtuIJfj13B0mvQkAvigSiKMKJNpsChkrQaQ5kZQU9sn3nbx
AXW4HE5wtnKFfypnmFKFBBV4otJvw89QvdNcw2bdHGVv6/aLk8CRi678KPHPq9mG
NcK3y/iQjfuru9qPjDCojI9pubJ2ePubpxt41lE3Yc8mCjetehFAxd5d+1kZxsN8
RIokhf12DdP9gy8Iy6Mc3lFqrAO33yoLAmeVM5avA7+vdBQfYIsZiSfuGg5sGYte
g+yDQ6vaqnD58U3SO77mmzTAbOScRoYzk+/wb0FFzJW097i4ejLCx8BqTirCBJfe
NMZ/vFmv13CHmzE1zZKoVpSRjvhzdVvds99HLLEXDeIa5CXdUwA0bEIQazEbDoC+
BmadxlCbiegGAq4uHwNo1cN3mgR+bL7JxhFPLZXpHT/dwbZDjqveLRspPa0gVsec
0RZwI2UcPnqIPL7081Mhs1IQ+w3HlPsMO+uOo8jUwgoZOsiN84Nw1EUcLCpV2BYj
fFJiF9Oq
=2ioq
-END PGP SIGNATURE-
---


No new revisions were added by this update.

Summary of changes:



(pulsar-client-cpp) 01/01: Release 3.5.0

2024-02-29 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git

commit 3b574c739e6a62696e0bf2374ab43e7f0b24b377
Author: Yunze Xu 
AuthorDate: Fri Mar 1 10:39:12 2024 +0800

Release 3.5.0
---
 version.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/version.txt b/version.txt
index b10ed39..1545d96 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-3.5.0-pre
+3.5.0



(pulsar-client-cpp) branch branch-3.5 created (now 3b574c7)

2024-02-29 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


  at 3b574c7  Release 3.5.0

This branch includes the following new commits:

 new 3b574c7  Release 3.5.0

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




(pulsar-client-cpp) branch main updated: Fix blue-green migration might be stuck due to an existing reconnection (#406)

2024-02-28 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


The following commit(s) were added to refs/heads/main by this push:
 new 9f96eb9  Fix blue-green migration might be stuck due to an existing 
reconnection (#406)
9f96eb9 is described below

commit 9f96eb98ff52cebc8b4360de5e6d44b42b89c6e9
Author: Yunze Xu 
AuthorDate: Thu Feb 29 10:56:20 2024 +0800

Fix blue-green migration might be stuck due to an existing reconnection 
(#406)

Fixes https://github.com/apache/pulsar-client-cpp/issues/405

### Motivation

After triggering a blue-green migration, the socket will be disconnected
and then schedule a reconnection to the blue cluster. However, the blue
cluster could never respond with a response for Producer or Subscribe
commands. Take producer as example, it means `connectionOpened` will not
complete and `reconnectionPending_` will not become false.

Then, after receiving a `CommandProducerClose` command from the blue
cluster, a new reconnection will be scheduled to the green cluster but
it will be skipped because `reconnectionPending_` is true, which means
the previous `connectionOpened` future is not completed until the 30s
timeout is reached.

```
2024-02-26 06:09:30.251 INFO  [139737465607744] HandlerBase:101 | 
[persistent://public/unload-test/topic-1708927732, sub, 0] Ignoring 
reconnection attempt since there's already a pending reconnection
2024-02-26 06:10:00.035 WARN  [139737859880512] ProducerImpl:291 | 
[persistent://public/unload-test/topic-1708927732, cluster-a-0-0] Failed to 
reconnect producer: TimeOut
```

### Modifications

When receiving the `TOPIC_MIGRATED` command, cancel the pending
`Producer` and `Subscribe` commands so that `connectionOpened` will fail
with a retryable error. In the next time of reconnection, the green
cluster will be connected.

Fix the `ExtensibleLoadManagerTest` with a more strict timeout check.
After this change, it will pass in about 3 seconds locally, while in CI
even if it passed, it takes about 70 seconds before.

Besides, fix the possible crash on macOS when closing the client, see

https://github.com/apache/pulsar-client-cpp/issues/405#issuecomment-1963969215
---
 lib/ClientConnection.cc | 12 +++
 lib/ClientConnection.h  |  2 ++
 lib/ConsumerImpl.cc |  4 ++-
 lib/HandlerBase.h   |  9 +
 lib/ProducerImpl.cc |  3 +-
 lib/stats/ConsumerStatsBase.h   |  1 +
 lib/stats/ConsumerStatsImpl.h   |  4 +++
 tests/PulsarFriend.h|  2 +-
 tests/extensibleLM/ExtensibleLoadManagerTest.cc | 45 ++---
 9 files changed, 60 insertions(+), 22 deletions(-)

diff --git a/lib/ClientConnection.cc b/lib/ClientConnection.cc
index 0beb739..abd38b4 100644
--- a/lib/ClientConnection.cc
+++ b/lib/ClientConnection.cc
@@ -1800,6 +1800,7 @@ void ClientConnection::handleTopicMigrated(const 
proto::CommandTopicMigrated& co
 if (it != producers_.end()) {
 auto producer = it->second.lock();
 producer->setRedirectedClusterURI(migratedBrokerServiceUrl);
+unsafeRemovePendingRequest(producer->firstRequestIdAfterConnect());
 LOG_INFO("Producer id:" << resourceId << " is migrated to " << 
migratedBrokerServiceUrl);
 } else {
 LOG_WARN("Got invalid producer Id in topicMigrated command: " << 
resourceId);
@@ -1809,6 +1810,7 @@ void ClientConnection::handleTopicMigrated(const 
proto::CommandTopicMigrated& co
 if (it != consumers_.end()) {
 auto consumer = it->second.lock();
 consumer->setRedirectedClusterURI(migratedBrokerServiceUrl);
+unsafeRemovePendingRequest(consumer->firstRequestIdAfterConnect());
 LOG_INFO("Consumer id:" << resourceId << " is migrated to " << 
migratedBrokerServiceUrl);
 } else {
 LOG_WARN("Got invalid consumer Id in topicMigrated command: " << 
resourceId);
@@ -2027,4 +2029,14 @@ void ClientConnection::handleAckResponse(const 
proto::CommandAckResponse& respon
 }
 }
 
+void ClientConnection::unsafeRemovePendingRequest(long requestId) {
+auto it = pendingRequests_.find(requestId);
+if (it != pendingRequests_.end()) {
+it->second.promise.setFailed(ResultDisconnected);
+ASIO_ERROR ec;
+it->second.timer->cancel(ec);
+pendingRequests_.erase(it);
+}
+}
+
 }  // namespace pulsar
diff --git a/lib/ClientConnection.h b/lib/ClientConnection.h
index 3c83b

(pulsar-client-go) branch master updated: [fix] Fix Infinite Loop in Reader's `HasNext` Function (#1182)

2024-02-28 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-go.git


The following commit(s) were added to refs/heads/master by this push:
 new 88a8d85c [fix] Fix Infinite Loop in Reader's `HasNext` Function (#1182)
88a8d85c is described below

commit 88a8d85cf6d6a4f282a5b39a2140a7bb06ba0f3b
Author: Zike Yang 
AuthorDate: Wed Feb 28 18:39:00 2024 +0800

[fix] Fix Infinite Loop in Reader's `HasNext` Function (#1182)

Fixes #1171

### Motivation

If `getLastMessageId` continually fails, the reader.HasNext can get stuck 
in an infinite loop. Without any backoff, the reader would keep trying forever.

### Modifications

- Implemented a backoff policy for `getLastMessageID`.
- If HasNext fails, it now returns false.

 Should the reader.HasNext returned `false` in case of failure?

Currently, the `HasNext` method doesn't report errors. However, failure is 
still possible. For instance, if `getLastMessageID` repeatedly fails and hits 
the retry limit. An option is to keep trying forever, but this would stall all 
user code. This isn't user-friendly, so I rejected this solution.

 Couldn't utilize the BackOffPolicy in the Reader Options

The `HasNext` retry mechanism requires to use of `IsMaxBackoffReached` for 
the backoff. But it isn't exposed in the `BackOffPolicy` interface. Introducing 
a new method to the `BackOffPolicy` would introduce breaking changes for the 
user backoff implementation. So, I choose not to implement it. Before we do it, 
we need to refine the BackOffPolicy.
---
 pulsar/client_impl.go| 24 +
 pulsar/consumer_partition.go | 53 +---
 pulsar/reader.go |  1 +
 pulsar/reader_test.go| 64 
 4 files changed, 115 insertions(+), 27 deletions(-)

diff --git a/pulsar/client_impl.go b/pulsar/client_impl.go
index 7daf6f62..65aed3b9 100644
--- a/pulsar/client_impl.go
+++ b/pulsar/client_impl.go
@@ -40,14 +40,15 @@ const (
 )
 
 type client struct {
-   cnxPool   internal.ConnectionPool
-   rpcClient internal.RPCClient
-   handlers  internal.ClientHandlers
-   lookupService internal.LookupService
-   metrics   *internal.Metrics
-   tcClient  *transactionCoordinatorClient
-   memLimit  internal.MemoryLimitController
-   closeOnce sync.Once
+   cnxPool  internal.ConnectionPool
+   rpcClientinternal.RPCClient
+   handlers internal.ClientHandlers
+   lookupServiceinternal.LookupService
+   metrics  *internal.Metrics
+   tcClient *transactionCoordinatorClient
+   memLimit internal.MemoryLimitController
+   closeOncesync.Once
+   operationTimeout time.Duration
 
log log.Logger
 }
@@ -161,9 +162,10 @@ func newClient(options ClientOptions) (Client, error) {
c := {
cnxPool: internal.NewConnectionPool(tlsConfig, authProvider, 
connectionTimeout, keepAliveInterval,
maxConnectionsPerHost, logger, metrics, 
connectionMaxIdleTime),
-   log:  logger,
-   metrics:  metrics,
-   memLimit: internal.NewMemoryLimitController(memLimitBytes, 
defaultMemoryLimitTriggerThreshold),
+   log:  logger,
+   metrics:  metrics,
+   memLimit: 
internal.NewMemoryLimitController(memLimitBytes, 
defaultMemoryLimitTriggerThreshold),
+   operationTimeout: operationTimeout,
}
serviceNameResolver := internal.NewPulsarServiceNameResolver(url)
 
diff --git a/pulsar/consumer_partition.go b/pulsar/consumer_partition.go
index 3572a522..162565b2 100644
--- a/pulsar/consumer_partition.go
+++ b/pulsar/consumer_partition.go
@@ -570,15 +570,41 @@ func (pc *partitionConsumer) internalUnsubscribe(unsub 
*unsubscribeRequest) {
 
 func (pc *partitionConsumer) getLastMessageID() (*trackingMessageID, error) {
if state := pc.getConsumerState(); state == consumerClosed || state == 
consumerClosing {
-   pc.log.WithField("state", state).Error("Failed to redeliver 
closing or closed consumer")
-   return nil, errors.New("failed to redeliver closing or closed 
consumer")
+   pc.log.WithField("state", state).Error("Failed to 
getLastMessageID for the closing or closed consumer")
+   return nil, errors.New("failed to getLastMessageID for the 
closing or closed consumer")
}
-   req := {doneCh: make(chan struct{})}
-   pc.eventsCh <- req
+   remainTime := pc.client.operationTimeout
+   var backoff internal.BackoffPolicy
+   if pc.options.backoffPolicy != nil {
+ 

(pulsar-site) branch bewaremypower/fix-ssl updated (3fcc50b1b13b -> 3cd75c4ccd9a)

2024-02-27 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch bewaremypower/fix-ssl
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


from 3fcc50b1b13b Fix incorrect command to generate public key for 
end-to-end encryption
 add 3cd75c4ccd9a Fix docs for 3.0.x and 3.1.x

No new revisions were added by this update.

Summary of changes:
 docs/security-encryption.md | 2 +-
 versioned_docs/version-3.0.x/security-encryption.md | 2 +-
 versioned_docs/version-3.1.x/security-encryption.md | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)



(pulsar-client-cpp) branch merlimat-patch-2 deleted (was 118d7c9)

2024-02-25 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch merlimat-patch-2
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


 was 118d7c9  Rolled back to previous Protobuf version

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(pulsar-client-cpp) branch main updated: [feat] PIP-188 Support blue-green migration (#402)

2024-02-20 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


The following commit(s) were added to refs/heads/main by this push:
 new 543e51c  [feat] PIP-188 Support blue-green migration (#402)
543e51c is described below

commit 543e51c7ecd842056f93859defd23b851bfe842e
Author: Heesung Sohn <103456639+heesung...@users.noreply.github.com>
AuthorDate: Tue Feb 20 19:02:31 2024 -0800

[feat] PIP-188 Support blue-green migration (#402)

### Motivation

Support blue-green migration pip-188 for cpp client

### Modifications

- added blue-green client logic
- register the producer instance in the producers map before sending 
produce creation command. This is required since broker could send topic 
migration command in the middle of creating the producer.
---
 lib/BinaryProtoLookupService.cc|   1 -
 lib/BinaryProtoLookupService.h |   8 +-
 lib/ClientConnection.cc|  57 ++-
 lib/ClientConnection.h |   9 +-
 lib/ClientImpl.cc  |  56 +--
 lib/ClientImpl.h   |  15 +-
 lib/HTTPLookupService.cc   |   4 +-
 lib/HTTPLookupService.h|   6 +-
 lib/HandlerBase.cc |  16 +-
 lib/HandlerBase.h  |   4 +
 lib/LookupService.h|   3 +
 lib/ProducerImpl.cc|   5 +-
 lib/RetryableLookupService.h   |   4 +
 lib/ServiceNameResolver.h  |  15 +-
 proto/PulsarApi.proto  |  16 ++
 run-unit-tests.sh  |   3 +
 tests/ClientTest.cc|  17 ++-
 tests/LookupServiceTest.cc |  32 ++--
 tests/MockClientImpl.h |   6 +-
 tests/PulsarFriend.h   |  12 +-
 .../docker-compose.yml |  40 ++---
 tests/extensibleLM/ExtensibleLoadManagerTest.cc| 169 ++---
 tests/extensibleLM/docker-compose.yml  |   4 +
 23 files changed, 356 insertions(+), 146 deletions(-)

diff --git a/lib/BinaryProtoLookupService.cc b/lib/BinaryProtoLookupService.cc
index 2d9ffc4..489d8a2 100644
--- a/lib/BinaryProtoLookupService.cc
+++ b/lib/BinaryProtoLookupService.cc
@@ -22,7 +22,6 @@
 #include "ConnectionPool.h"
 #include "LogUtils.h"
 #include "NamespaceName.h"
-#include "ServiceNameResolver.h"
 #include "TopicName.h"
 
 DECLARE_LOG_OBJECT()
diff --git a/lib/BinaryProtoLookupService.h b/lib/BinaryProtoLookupService.h
index a3c059e..6132825 100644
--- a/lib/BinaryProtoLookupService.h
+++ b/lib/BinaryProtoLookupService.h
@@ -38,9 +38,9 @@ using GetSchemaPromisePtr = std::shared_ptr>;
 
 class PULSAR_PUBLIC BinaryProtoLookupService : public LookupService {
public:
-BinaryProtoLookupService(ServiceNameResolver& serviceNameResolver, 
ConnectionPool& pool,
+BinaryProtoLookupService(const std::string& serviceUrl, ConnectionPool& 
pool,
  const ClientConfiguration& clientConfiguration)
-: serviceNameResolver_(serviceNameResolver),
+: serviceNameResolver_(serviceUrl),
   cnxPool_(pool),
   listenerName_(clientConfiguration.getListenerName()),
   maxLookupRedirects_(clientConfiguration.getMaxLookupRedirects()) {}
@@ -54,6 +54,8 @@ class PULSAR_PUBLIC BinaryProtoLookupService : public 
LookupService {
 
 Future getSchema(const TopicNamePtr& topicName, const 
std::string& version) override;
 
+ServiceNameResolver& getServiceNameResolver() override { return 
serviceNameResolver_; }
+
protected:
 // Mark findBroker as protected to make it accessible from test.
 LookupResultFuture findBroker(const std::string& address, bool 
authoritative, const std::string& topic,
@@ -63,7 +65,7 @@ class PULSAR_PUBLIC BinaryProtoLookupService : public 
LookupService {
 std::mutex mutex_;
 uint64_t requestIdGenerator_ = 0;
 
-ServiceNameResolver& serviceNameResolver_;
+ServiceNameResolver serviceNameResolver_;
 ConnectionPool& cnxPool_;
 std::string listenerName_;
 const int32_t maxLookupRedirects_;
diff --git a/lib/ClientConnection.cc b/lib/ClientConnection.cc
index 00041b2..0beb739 100644
--- a/lib/ClientConnection.cc
+++ b/lib/ClientConnection.cc
@@ -403,7 +403,8 @@ void ClientConnection::handleTcpConnected(const ASIO_ERROR& 
err, tcp::resolver::
 LOG_INFO(cnxString_ << "Connected to broker");
 } else {
 LOG_INFO(cnxString_ << "Co

(pulsar-client-python) branch main updated: Fix incorrect logs when a message failed to be decoded with the writer schema (#200)

2024-02-18 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git


The following commit(s) were added to refs/heads/main by this push:
 new 48be179  Fix incorrect logs when a message failed to be decoded with 
the writer schema (#200)
48be179 is described below

commit 48be1795a7993422cf4bce2785351f48e456dc26
Author: Yunze Xu 
AuthorDate: Mon Feb 19 10:46:53 2024 +0800

Fix incorrect logs when a message failed to be decoded with the writer 
schema (#200)

### Motivation

See

https://github.com/apache/pulsar-client-python/blob/f9b2d168ae85f289d6ee043cd81791d569ba8844/pulsar/schema/schema_avro.py#L92C32-L92C69

When `self._decode_bytes(msg.data(), writer_schema)` failed, the error
log is still `Failed to get schema info`, which is confusing.

### Modifications

Modify the error message. Even if it failed at
`self._get_writer_schema(topic, version)`, there would still be error
logs from the C++ client.
---
 pulsar/schema/schema_avro.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pulsar/schema/schema_avro.py b/pulsar/schema/schema_avro.py
index 480afe9..09b341b 100644
--- a/pulsar/schema/schema_avro.py
+++ b/pulsar/schema/schema_avro.py
@@ -91,7 +91,8 @@ if HAS_AVRO:
 writer_schema = self._get_writer_schema(topic, version)
 return self._decode_bytes(msg.data(), writer_schema)
 except Exception as e:
-self._logger.error(f'Failed to get schema info of {topic} 
version {version}: {e}')
+msg_id = msg.message_id()
+self._logger.warn(f'Failed to decode {msg_id} with schema 
{topic} version {version}: {e}')
 return self._decode_bytes(msg.data(), self._schema)
 
 def _get_writer_schema(self, topic: str, version: int) -> 'dict':



(pulsar-client-cpp) branch main updated: Disable batch send for dlq producer. (#403)

2024-02-18 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


The following commit(s) were added to refs/heads/main by this push:
 new 7891ac5  Disable batch send for dlq producer. (#403)
7891ac5 is described below

commit 7891ac569eeca8e8cfeedf4ee005a26f98a0ca71
Author: Baodi Shi 
AuthorDate: Mon Feb 19 10:18:11 2024 +0800

Disable batch send for dlq producer. (#403)
---
 lib/ConsumerImpl.cc  | 1 +
 tests/DeadLetterQueueTest.cc | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/lib/ConsumerImpl.cc b/lib/ConsumerImpl.cc
index 0051ed6..4181f05 100644
--- a/lib/ConsumerImpl.cc
+++ b/lib/ConsumerImpl.cc
@@ -1736,6 +1736,7 @@ void ConsumerImpl::processPossibleToDLQ(const MessageId& 
messageId, ProcessDLQCa
 ProducerConfiguration producerConfiguration;
 producerConfiguration.setSchema(config_.getSchema());
 producerConfiguration.setBlockIfQueueFull(false);
+producerConfiguration.setBatchingEnabled(false);
 producerConfiguration.impl_->initialSubscriptionName =
 deadLetterPolicy_.getInitialSubscriptionName();
 ClientImplPtr client = client_.lock();
diff --git a/tests/DeadLetterQueueTest.cc b/tests/DeadLetterQueueTest.cc
index 1a747cc..06cd196 100644
--- a/tests/DeadLetterQueueTest.cc
+++ b/tests/DeadLetterQueueTest.cc
@@ -270,6 +270,8 @@ TEST_P(DeadLetterQueueTest, 
testSendDLQTriggerByRedeliverUnacknowledgedMessages)
 ASSERT_EQ(msg.getPartitionKey(), "p-key");
 ASSERT_EQ(msg.getOrderingKey(), "o-key");
 ASSERT_EQ(msg.getProperty("pk-1"), "pv-1");
+ASSERT_EQ(msg.getMessageId().batchSize(), 0);
+ASSERT_EQ(msg.getMessageId().batchIndex(), -1);
 ASSERT_TRUE(msg.getProperty(SYSTEM_PROPERTY_REAL_TOPIC).find(topic_));
 ASSERT_FALSE(msg.getProperty(PROPERTY_ORIGIN_MESSAGE_ID).empty());
 }



(pulsar-client-python) branch main updated: Disable topic level policies to make tests work for latest Pulsar (#201)

2024-02-18 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git


The following commit(s) were added to refs/heads/main by this push:
 new 865bc9d  Disable topic level policies to make tests work for latest 
Pulsar (#201)
865bc9d is described below

commit 865bc9d3d8a3f793c759acc67a60dcb0c947675b
Author: Yunze Xu 
AuthorDate: Mon Feb 19 10:08:18 2024 +0800

Disable topic level policies to make tests work for latest Pulsar (#201)

See https://lists.apache.org/thread/gjdvl1ys71k9mknwypxgkbsdyjwr31yt
---
 tests/test-conf/standalone-ssl.conf | 5 +
 1 file changed, 5 insertions(+)

diff --git a/tests/test-conf/standalone-ssl.conf 
b/tests/test-conf/standalone-ssl.conf
index beed278..74a0b37 100644
--- a/tests/test-conf/standalone-ssl.conf
+++ b/tests/test-conf/standalone-ssl.conf
@@ -310,3 +310,8 @@ maxMessageSize=1024000
 
 # Disable consistent hashing to fix flaky 
`KeySharedConsumerTest#testMultiTopics`.
 subscriptionKeySharedUseConsistentHashing=false
+
+# It's true by default since 2.11. After 
https://github.com/apache/pulsar/pull/21445, we must configure
+# brokerClientAuthenticationPlugin and brokerClientAuthenticationParameters 
correctly when enabling topic
+# level policies. Otherwise, no topic could be loaded.
+topicLevelPoliciesEnabled=false



(pulsar) branch branch-3.2 updated: [improve][broker] Do not close the socket if lookup failed due to LockBusyException (#21993)

2024-02-06 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-3.2 by this push:
 new 77c20c86693 [improve][broker] Do not close the socket if lookup failed 
due to LockBusyException (#21993)
77c20c86693 is described below

commit 77c20c86693fb1459555112c4183c46a307f6733
Author: Yunze Xu 
AuthorDate: Fri Feb 2 10:12:19 2024 +0800

[improve][broker] Do not close the socket if lookup failed due to 
LockBusyException (#21993)

(cherry picked from commit e7c2a75473b545134a3b292ae0e87a79d65cb756)
---
 .../pulsar/broker/lookup/TopicLookupBase.java  |  8 +++--
 .../pulsar/client/api/BrokerServiceLookupTest.java | 39 ++
 2 files changed, 45 insertions(+), 2 deletions(-)

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/lookup/TopicLookupBase.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/lookup/TopicLookupBase.java
index c4a39cd0d44..7b2c7774148 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/lookup/TopicLookupBase.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/lookup/TopicLookupBase.java
@@ -30,6 +30,7 @@ import javax.ws.rs.Encoded;
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.Response;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.pulsar.broker.PulsarServerException;
 import org.apache.pulsar.broker.PulsarService;
 import org.apache.pulsar.broker.ServiceConfiguration;
 import org.apache.pulsar.broker.authentication.AuthenticationDataSource;
@@ -333,13 +334,16 @@ public class TopicLookupBase extends PulsarWebResource {
 
 private static void handleLookupError(CompletableFuture 
lookupFuture, String topicName, String clientAppId,
long requestId, Throwable ex){
-final Throwable unwrapEx = FutureUtil.unwrapCompletionException(ex);
+Throwable unwrapEx = FutureUtil.unwrapCompletionException(ex);
 final String errorMsg = unwrapEx.getMessage();
+if (unwrapEx instanceof PulsarServerException) {
+unwrapEx = 
FutureUtil.unwrapCompletionException(unwrapEx.getCause());
+}
 if (unwrapEx instanceof IllegalStateException) {
 // Current broker still hold the bundle's lock, but the bundle is 
being unloading.
 log.info("Failed to lookup {} for topic {} with error {}", 
clientAppId, topicName, errorMsg);
 
lookupFuture.complete(newLookupErrorResponse(ServerError.MetadataError, 
errorMsg, requestId));
-} else if (unwrapEx instanceof MetadataStoreException){
+} else if (unwrapEx instanceof MetadataStoreException) {
 // Load bundle ownership or acquire lock failed.
 // Differ with "IllegalStateException", print warning log.
 log.warn("Failed to lookup {} for topic {} with error {}", 
clientAppId, topicName, errorMsg);
diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/BrokerServiceLookupTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/BrokerServiceLookupTest.java
index dab4fe9087e..0a4c5b7a318 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/BrokerServiceLookupTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/BrokerServiceLookupTest.java
@@ -71,6 +71,7 @@ import org.apache.pulsar.broker.loadbalance.ResourceUnit;
 import org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl;
 import org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerWrapper;
 import org.apache.pulsar.broker.loadbalance.impl.SimpleResourceUnit;
+import org.apache.pulsar.broker.namespace.NamespaceEphemeralData;
 import org.apache.pulsar.broker.namespace.NamespaceService;
 import org.apache.pulsar.broker.namespace.OwnedBundle;
 import org.apache.pulsar.broker.namespace.OwnershipCache;
@@ -1208,4 +1209,42 @@ public class BrokerServiceLookupTest extends 
ProducerConsumerBase {
 mockZooKeeper.unsetAlwaysFail();
 }
 }
+
+@Test(timeOut = 3)
+public void 
testLookupConnectionNotCloseIfFailedToAcquireOwnershipOfBundle() throws 
Exception {
+String tpName = 
BrokerTestUtil.newUniqueName("persistent://public/default/tp");
+admin.topics().createNonPartitionedTopic(tpName);
+final var pulsarClientImpl = (PulsarClientImpl) pulsarClient;
+final var cache = pulsar.getNamespaceService().getOwnershipCache();
+final var bundle = 
pulsar.getNamespaceService().getBundle(TopicName.get(tpName));
+final var value = cache.getOwnerAsync(bundle).get().orElse(null);
+assertNotNull(value);
+
+cache.invalidateLocalOwnerCache();
+final var lock = 
pulsar.getCoordinationService().getLockManager(NamespaceEphemeralData.class)
+.acquir

(pulsar-client-cpp) branch main updated (3983500 -> 68b4244)

2024-02-06 Thread xyz
This is an automated email from the ASF dual-hosted git repository.

xyz pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


from 3983500  Add codeql code scanning configuration (#10)
 add 68b4244  Fix creating producer or consumer is not retried for 
connection failure (#396)

No new revisions were added by this update.

Summary of changes:
 lib/ClientConnection.cc   | 11 --
 lib/ClientConnectionAdaptor.h |  4 +-
 lib/ClientImpl.cc |  4 +-
 lib/ClientImpl.h  |  8 ++--
 lib/ConsumerImpl.cc   |  2 +-
 lib/Future.h  |  9 +
 lib/HandlerBase.cc| 21 --
 lib/HandlerBase.h |  1 +
 lib/ProducerImpl.cc   |  2 +-
 lib/ResultUtils.h | 29 +-
 tests/ClientTest.cc   | 75 +--
 tests/MockClientImpl.h| 92 +++
 12 files changed, 239 insertions(+), 19 deletions(-)
 create mode 100644 tests/MockClientImpl.h



  1   2   3   4   5   6   7   8   9   >