EronWright opened a new issue #14304:
URL: https://github.com/apache/pulsar/issues/14304


   **Describe the bug**
   Some of the language bindings supply an empty string for the 
`advertisedListenerName` field of `CommandLookupTopic` (e.g. 
[Java](https://github.com/streamnative/pulsar/blob/2d092374e189093cce7c792dd31bf9290a3e7d82/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/Commands.java#L820-L822)
 vs 
[Golang](https://github.com/apache/pulsar-client-go/blob/d7b4299758f3dacc44f20908c9a5270abbac5248/pulsar/internal/lookup_service.go#L121-L126)).
   This confuses the broker, who then fails to apply the default advertised 
listener for the given server port.  This, in turn, leads to an incorrect topic 
lookup response and a subsequent connection failure.
   
   For background, see [[PIP 95] Smart Listener Selection with Multiple Bind 
Addresses](https://github.com/apache/pulsar/issues/12040).
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Configure a broker with a bind address that is associated with an 
advertised listener.
   2. Using various language clients, send a topic lookup request without an 
explicit advertised listener to the bind address.  Expect the default 
advertised listener for that binding to be used.
   3. Observe that some clients receive the correct advertised listener, others 
don't. 
   
   **Expected behavior**
   Expect the binding-specific advertised listener to be automatically applied 
to lookup request.
   
   **Proposed Solution**
   Enhance the broker to check for an empty string in the 
`advertisedListenerName` field.  
([code](https://github.com/apache/pulsar/blob/aa9f42c3c7d4eb8612602da9cab28d72fdd5b71f/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java#L421-L423))


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to