merlimat commented on a change in pull request #2543: Add ServiceUrlProvider and add method forceCloseConnection in PulsarC… URL: https://github.com/apache/incubator-pulsar/pull/2543#discussion_r216139475
########## File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarClientImpl.java ########## @@ -706,6 +706,58 @@ public void shutdown() throws PulsarClientException { } } + @Override + public void forceCloseConnection() { + if (this.producers != null) { Review comment: There are few problems with this way of closing the connections. `channelInactive()` is supposed to be called by Netty when the connection gets closed. With the current approache the original TCP connection will stay open and the broker will still have registered the producer/consumer as connected. The right approach here should be to close all the connections in the `ConnectionPool`. That will be triggering the reconnections for all producers/consumers. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services