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 96692ab  Bump cpp version to 4.1.0 (#471)
96692ab is described below

commit 96692abf51d5fa37434fa5964752a4369f573b34
Author: Baodi Shi <[email protected]>
AuthorDate: Tue Mar 31 15:37:17 2026 +0800

    Bump cpp version to 4.1.0 (#471)
---
 index.d.ts               |  1 -
 pulsar-client-cpp.txt    |  4 ++--
 src/Client.cc            |  6 ------
 tests/end_to_end.test.js | 22 ++++++++++++----------
 tstest.ts                |  1 -
 5 files changed, 14 insertions(+), 20 deletions(-)

diff --git a/index.d.ts b/index.d.ts
index b85b623..0e4f070 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -25,7 +25,6 @@ export interface ClientConfig {
   ioThreads?: number;
   messageListenerThreads?: number;
   concurrentLookupRequest?: number;
-  useTls?: boolean;
   tlsTrustCertsFilePath?: string;
   tlsCertificateFilePath?: string;
   tlsPrivateKeyFilePath?: string;
diff --git a/pulsar-client-cpp.txt b/pulsar-client-cpp.txt
index ddcbe45..04230d8 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-4.0.1
-CPP_CLIENT_VERSION=4.0.1
+CPP_CLIENT_BASE_URL=https://archive.apache.org/dist/pulsar/pulsar-client-cpp-4.1.0
+CPP_CLIENT_VERSION=4.1.0
\ No newline at end of file
diff --git a/src/Client.cc b/src/Client.cc
index 29d542c..6d09cd7 100644
--- a/src/Client.cc
+++ b/src/Client.cc
@@ -35,7 +35,6 @@ static const std::string CFG_OP_TIMEOUT = 
"operationTimeoutSeconds";
 static const std::string CFG_IO_THREADS = "ioThreads";
 static const std::string CFG_LISTENER_THREADS = "messageListenerThreads";
 static const std::string CFG_CONCURRENT_LOOKUP = "concurrentLookupRequest";
-static const std::string CFG_USE_TLS = "useTls";
 static const std::string CFG_TLS_TRUST_CERT = "tlsTrustCertsFilePath";
 static const std::string CFG_TLS_VALIDATE_HOSTNAME = "tlsValidateHostname";
 static const std::string CFG_TLS_ALLOW_INSECURE = "tlsAllowInsecureConnection";
@@ -187,11 +186,6 @@ Client::Client(const Napi::CallbackInfo &info) : 
Napi::ObjectWrap<Client>(info)
     }
   }
 
-  if (clientConfig.Has(CFG_USE_TLS) && 
clientConfig.Get(CFG_USE_TLS).IsBoolean()) {
-    Napi::Boolean useTls = clientConfig.Get(CFG_USE_TLS).ToBoolean();
-    pulsar_client_configuration_set_use_tls(cClientConfig.get(), 
useTls.Value());
-  }
-
   if (clientConfig.Has(CFG_TLS_TRUST_CERT) && 
clientConfig.Get(CFG_TLS_TRUST_CERT).IsString()) {
     Napi::String tlsTrustCertsFilePath = 
clientConfig.Get(CFG_TLS_TRUST_CERT).ToString();
     
pulsar_client_configuration_set_tls_trust_certs_file_path(cClientConfig.get(),
diff --git a/tests/end_to_end.test.js b/tests/end_to_end.test.js
index e652c79..53c503d 100644
--- a/tests/end_to_end.test.js
+++ b/tests/end_to_end.test.js
@@ -1409,14 +1409,15 @@ const Pulsar = require('../index');
         });
       }
 
-      // 2. Verify message order (based on key dictionary order)
+      // 2. Verify message order follows the first sequence id per key-based 
batch,
+      // matching pulsar-client-cpp#546.
       const expected = [
+        { key: 'A', value: '0' },
+        { key: 'A', value: '5' },
         { key: 'B', value: '1' },
         { key: 'B', value: '3' },
         { key: 'C', value: '2' },
         { key: 'C', value: '4' },
-        { key: 'A', value: '0' },
-        { key: 'A', value: '5' },
       ];
 
       expect(received).toEqual(expected);
@@ -1438,17 +1439,18 @@ const Pulsar = require('../index');
 
       // 2. Receive messages and verify their order and keys
       const msg1 = await receiveAndAck();
-      expect(msg1.getData().toString()).toBe('2');
-      expect(msg1.getOrderingKey().toString()).toBe('B');
+      expect(msg1.getData().toString()).toBe('0');
+      expect(msg1.getOrderingKey().toString()).toBe('A');
+      expect(msg1.getPartitionKey()).toBe('B');
 
       const msg2 = await receiveAndAck();
-      expect(msg2.getData().toString()).toBe('0');
-      expect(msg2.getOrderingKey()).toBe('A');
-      expect(msg2.getPartitionKey()).toBe('B');
+      expect(msg2.getData().toString()).toBe('1');
+      expect(msg2.getOrderingKey().toString()).toBe('A');
+      expect(msg2.getPartitionKey()).toBe('');
 
       const msg3 = await receiveAndAck();
-      expect(msg3.getData().toString()).toBe('1');
-      expect(msg3.getOrderingKey().toString()).toBe('A');
+      expect(msg3.getData().toString()).toBe('2');
+      expect(msg3.getOrderingKey().toString()).toBe('B');
     });
   });
 })();
diff --git a/tstest.ts b/tstest.ts
index 1ca89b7..b1d81f0 100644
--- a/tstest.ts
+++ b/tstest.ts
@@ -84,7 +84,6 @@ import Pulsar = require('./index');
     ioThreads: 4,
     messageListenerThreads: 4,
     concurrentLookupRequest: 100,
-    useTls: false,
     tlsTrustCertsFilePath: '/path/to/ca-cert.pem',
     tlsValidateHostname: false,
     tlsAllowInsecureConnection: false,

Reply via email to