merlimat opened a new pull request, #25720:
URL: https://github.com/apache/pulsar/pull/25720

   ## Summary
   
   The v5 client only speaks the broker binary protocol; passing the admin/web 
service URL (`http://` or `https://`) used to silently accept the value and 
then fail far downstream with a cryptic connection error. This PR validates the 
URL at configure-time and fails fast with a message that points to the right 
URL.
   
   - `PulsarClientBuilder.serviceUrl()` and `ConnectionPolicy.proxyServiceUrl` 
must use `pulsar://` or `pulsar+ssl://`. Anything else throws 
`IllegalArgumentException` at the setter.
   - The error message for `http://` / `https://` specifically calls out the 
admin-URL confusion and hints at the broker port (6650 / 6651).
   - API javadoc updated to document the contract and the `@throws`.
   
   ## Test plan
   
   - [x] New `PulsarClientBuilderV5Test` covers:
     - Accepted forms: `pulsar://host:port`, `pulsar+ssl://host:port`, 
multi-host comma list (`pulsar://h1:p,h2:p,h3:p`)
     - Rejected schemes: `http://` (with admin-URL guidance + port hint), 
`https://` (with TLS-broker-scheme hint), `ws://`, null, blank
     - `ConnectionPolicy.proxyServiceUrl` is validated too
   - [x] All `pulsar-client-v5` unit tests pass
   - [x] Checkstyle clean


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