Improve service URL DNS resolution #929
Labels
type/enhancement
The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Milestone
Expected behavior
When doing lookups, we are connecting to the endpoint represented by its
serviceUrl
. When using native Pulsar protocol, we should resolve the DNS at each attempt, in order to adapt when the DNS config changes.Additionally, at each attempt, we need to try all the IP addresses returned by DNS, since in same cases DNS is used as a service discovery mechanism.
This is already working correctly on HTTP based lookup where the serviceUrl is passed to
asyncHttpClient
library.Actual behavior
Currently, the client impl is resolving the serviceUrl name at startup at it is caching the 1st IP address:
https://github.com/apache/incubator-pulsar/blob/4288839fb82f2c64549fc8c6fb4f70db2b72b961/pulsar-client/src/main/java/org/apache/pulsar/client/impl/BinaryProtoLookupService.java#L52
The text was updated successfully, but these errors were encountered: