Skip to content

Commit 96692ab

Browse files
authored
Bump cpp version to 4.1.0 (#471)
1 parent 3fe9432 commit 96692ab

5 files changed

Lines changed: 14 additions & 20 deletions

File tree

index.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export interface ClientConfig {
2525
ioThreads?: number;
2626
messageListenerThreads?: number;
2727
concurrentLookupRequest?: number;
28-
useTls?: boolean;
2928
tlsTrustCertsFilePath?: string;
3029
tlsCertificateFilePath?: string;
3130
tlsPrivateKeyFilePath?: string;

pulsar-client-cpp.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
CPP_CLIENT_BASE_URL=https://archive.apache.org/dist/pulsar/pulsar-client-cpp-4.0.1
2-
CPP_CLIENT_VERSION=4.0.1
1+
CPP_CLIENT_BASE_URL=https://archive.apache.org/dist/pulsar/pulsar-client-cpp-4.1.0
2+
CPP_CLIENT_VERSION=4.1.0

src/Client.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ static const std::string CFG_OP_TIMEOUT = "operationTimeoutSeconds";
3535
static const std::string CFG_IO_THREADS = "ioThreads";
3636
static const std::string CFG_LISTENER_THREADS = "messageListenerThreads";
3737
static const std::string CFG_CONCURRENT_LOOKUP = "concurrentLookupRequest";
38-
static const std::string CFG_USE_TLS = "useTls";
3938
static const std::string CFG_TLS_TRUST_CERT = "tlsTrustCertsFilePath";
4039
static const std::string CFG_TLS_VALIDATE_HOSTNAME = "tlsValidateHostname";
4140
static const std::string CFG_TLS_ALLOW_INSECURE = "tlsAllowInsecureConnection";
@@ -187,11 +186,6 @@ Client::Client(const Napi::CallbackInfo &info) : Napi::ObjectWrap<Client>(info)
187186
}
188187
}
189188

190-
if (clientConfig.Has(CFG_USE_TLS) && clientConfig.Get(CFG_USE_TLS).IsBoolean()) {
191-
Napi::Boolean useTls = clientConfig.Get(CFG_USE_TLS).ToBoolean();
192-
pulsar_client_configuration_set_use_tls(cClientConfig.get(), useTls.Value());
193-
}
194-
195189
if (clientConfig.Has(CFG_TLS_TRUST_CERT) && clientConfig.Get(CFG_TLS_TRUST_CERT).IsString()) {
196190
Napi::String tlsTrustCertsFilePath = clientConfig.Get(CFG_TLS_TRUST_CERT).ToString();
197191
pulsar_client_configuration_set_tls_trust_certs_file_path(cClientConfig.get(),

tests/end_to_end.test.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,14 +1409,15 @@ const Pulsar = require('../index');
14091409
});
14101410
}
14111411

1412-
// 2. Verify message order (based on key dictionary order)
1412+
// 2. Verify message order follows the first sequence id per key-based batch,
1413+
// matching pulsar-client-cpp#546.
14131414
const expected = [
1415+
{ key: 'A', value: '0' },
1416+
{ key: 'A', value: '5' },
14141417
{ key: 'B', value: '1' },
14151418
{ key: 'B', value: '3' },
14161419
{ key: 'C', value: '2' },
14171420
{ key: 'C', value: '4' },
1418-
{ key: 'A', value: '0' },
1419-
{ key: 'A', value: '5' },
14201421
];
14211422

14221423
expect(received).toEqual(expected);
@@ -1438,17 +1439,18 @@ const Pulsar = require('../index');
14381439

14391440
// 2. Receive messages and verify their order and keys
14401441
const msg1 = await receiveAndAck();
1441-
expect(msg1.getData().toString()).toBe('2');
1442-
expect(msg1.getOrderingKey().toString()).toBe('B');
1442+
expect(msg1.getData().toString()).toBe('0');
1443+
expect(msg1.getOrderingKey().toString()).toBe('A');
1444+
expect(msg1.getPartitionKey()).toBe('B');
14431445

14441446
const msg2 = await receiveAndAck();
1445-
expect(msg2.getData().toString()).toBe('0');
1446-
expect(msg2.getOrderingKey()).toBe('A');
1447-
expect(msg2.getPartitionKey()).toBe('B');
1447+
expect(msg2.getData().toString()).toBe('1');
1448+
expect(msg2.getOrderingKey().toString()).toBe('A');
1449+
expect(msg2.getPartitionKey()).toBe('');
14481450

14491451
const msg3 = await receiveAndAck();
1450-
expect(msg3.getData().toString()).toBe('1');
1451-
expect(msg3.getOrderingKey().toString()).toBe('A');
1452+
expect(msg3.getData().toString()).toBe('2');
1453+
expect(msg3.getOrderingKey().toString()).toBe('B');
14521454
});
14531455
});
14541456
})();

tstest.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ import Pulsar = require('./index');
8484
ioThreads: 4,
8585
messageListenerThreads: 4,
8686
concurrentLookupRequest: 100,
87-
useTls: false,
8887
tlsTrustCertsFilePath: '/path/to/ca-cert.pem',
8988
tlsValidateHostname: false,
9089
tlsAllowInsecureConnection: false,

0 commit comments

Comments
 (0)