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

   Fixes [apache#22808](https://github.com/apache/pulsar/issues/22808)
   
   ### Motivation
   
   Pulsar CLI tools (`pulsar-client` and `pulsar-perf`) are not picking up 
timeout configurations from `conf/client.conf`.
   
   Even when `lookupTimeoutMs` and `operationTimeoutMs` are explicitly set, the 
CLI continues to use default values:
   
   - `"operationTimeoutMs": 30000`
   - `"lookupTimeoutMs": 30000`
   
   This is because these properties are not being properly loaded and applied 
to the internal `ClientBuilder`.
   
   As a result, user-defined timeout configurations are ignored at runtime, 
unlike the Java client where the same settings work as expected.
   
   
   ### Modifications
   
   - Loaded `operationTimeoutMs` and `lookupTimeoutMs` explicitly from 
`Properties`
   - Parsed and applied them to:
     - `clientBuilder.operationTimeout(...)`
     - `clientBuilder.lookupTimeout(...)`
   - Added basic validation (`isNotBlank`, `trim`) before parsing
   - Handled invalid values using `try-catch (NumberFormatException)`
   - Logged a warning via `commander.getErr().println()` and fallback to 
defaults when parsing fails
   
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change added tests and can be verified as follows:
   
   - Added `testTimeoutConfigurationLoading` in `PulsarClientToolTest`
   - Injected custom timeout values (55000, 65000) via `Properties`
   - Verified that `ClientConfigurationData` reflects the configured values 
instead of defaults
   
   
   ### Does this pull request potentially affect one of the following parts:
   
   - [ ] Dependencies (add or upgrade a dependency)  
   - [ ] The public API  
   - [ ] The schema  
   - [ ] The default values of configurations  
   - [ ] The threading model  
   - [ ] The binary protocol  
   - [ ] The REST endpoints  
   - [x] The admin CLI options  
   - [ ] The metrics  
   - [ ] Anything that affects deployment  


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