[fix][broker] Can't connecte to non-persist topic when enable broker client tls - #22991
Conversation
|
@shibd I need to confirm two questions: Do you know if you only enabled TLS? Usually, the |
oh, I understand this sentence. Yes, your are right. But, in current implementation. If enable BrokerClientTls, will use pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java Lines 1679 to 1681 in 4e535cb then, in here. It will use and will create a new BinaryProtoLookupService with incorrect param: (noTlsBrokerUrl, and enableTls) and then, when create a new connection, into this logic, resulting in an error. |
|
So, I think the root cause is we not should use internal method for PulsarClient on here. I think this fix can make sure use same connection type with In future, maybe we need refactor this logic. /cc @poorbarcode |
nodece
left a comment
There was a problem hiding this comment.
Thanks for your explanation! LGTM
So far, the method
There is retry mechanism on the client-side when calling |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #22991 +/- ##
============================================
- Coverage 73.57% 73.45% -0.12%
- Complexity 32624 33289 +665
============================================
Files 1877 1908 +31
Lines 139502 143001 +3499
Branches 15299 15589 +290
============================================
+ Hits 102638 105041 +2403
- Misses 28908 29921 +1013
- Partials 7956 8039 +83
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…client tls (apache#22991) (cherry picked from commit deb26f7) (cherry picked from commit 998bd90)
…client tls (apache#22991) (cherry picked from commit deb26f7) (cherry picked from commit 998bd90)

Motivation
After #22838, if to connect a non-persist topic when broker enable client TLS, will failed.
The reason is lookup always uses
brokerUrlinstead ofbrokerTlsUrl.Modifications
Verifying this change
testNonPersistentTopicto cover it.Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: