You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/09/15 11:25:28 UTC

[GitHub] [pulsar] racorn commented on pull request #8062: [pulsar-client] Fix: avoid resolving address for sni-host + thread-safe connection creation

racorn commented on pull request #8062:
URL: https://github.com/apache/pulsar/pull/8062#issuecomment-692653350


   @rdhabalia Thanks for adding thread safety.
   
   I notice the use of a mutex. A lock-free alternative would be more involved, not sure if would be worth the effort. Anyway, a possible solution could be to have the `ConnectionPool` take more responsibility of bootstrapping TLS connections. For example invoking `Bootstrap.register` instead of `Bootstrap.connect`, and adding the `SSLHandler` to the channel pipeline outside of `PulsarChannelInitializer.initChannel()` before connecting the channel to the remote host. The `SSLHandler` could be added in a new method in `PulsarChannelInitializer`, for example `initSSL(Channel channel, String sniHostName, int sniHostPort)`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org