diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java index fe848b5e8b466..31b7fa391f245 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java @@ -910,6 +910,14 @@ public synchronized PulsarClient getClient() throws PulsarServerException { .enableTls(this.getConfiguration().isTlsEnabled()) .allowTlsInsecureConnection(this.getConfiguration().isTlsAllowInsecureConnection()) .tlsTrustCertsFilePath(this.getConfiguration().getTlsCertificateFilePath()); + + if (this.getConfiguration().isBrokerClientTlsEnabled()) { + builder.tlsTrustCertsFilePath( + isNotBlank(this.getConfiguration().getBrokerClientTrustCertsFilePath()) + ? this.getConfiguration().getBrokerClientTrustCertsFilePath() + : this.getConfiguration().getTlsCertificateFilePath()); + } + if (isNotBlank(this.getConfiguration().getBrokerClientAuthenticationPlugin())) { builder.authentication(this.getConfiguration().getBrokerClientAuthenticationPlugin(), this.getConfiguration().getBrokerClientAuthenticationParameters()); diff --git a/pulsar-client-cpp/python/pulsar_test.py b/pulsar-client-cpp/python/pulsar_test.py index 14cf2938bc554..4109ec79eeaa2 100755 --- a/pulsar-client-cpp/python/pulsar_test.py +++ b/pulsar-client-cpp/python/pulsar_test.py @@ -152,7 +152,7 @@ def test_redelivery_count(self): producer.send(b'hello') redelivery_count = 0 - for i in range(4): + for i in range(4): msg = consumer.receive(TM) print("Received message %s" % msg.data()) consumer.negative_acknowledge(msg) @@ -668,13 +668,13 @@ def test_publish_compact_and_consume(self): while True: s=doHttpGet(url).decode('utf-8') if 'RUNNING' in s: - print("Compact still running") print(s) + print("Compact still running") time.sleep(0.2) else: - self.assertTrue('SUCCESS' in s) - print("Compact Complete now") print(s) + print("Compact Complete now") + self.assertTrue('SUCCESS' in s) break # after compaction completes the compacted ledger is recorded