horsteff opened a new issue #7492:
URL: https://github.com/apache/pulsar/issues/7492


   **Describe the bug**
   `PulsarStandaloneBuilder` does not use a custom configuration set with 
`withConfig()`. It's clearly visible in the code:
   ```java
       public PulsarStandalone build() {
           ServiceConfiguration config = new ServiceConfiguration();
           config.setClusterName("standalone");
           pulsarStandalone.setConfig(config);
           ...
   ```
    At the beginning of `PulsarStandaloneBuilder.build()` a new 
`ServiceConfiguration` instance is created and set with 
`pulsarStandalone.setConfig()` overwriting any configuration instance set 
earlier with `PulsarStandaloneBuilder.withConfig()`.
   
   Additionally unlike in `PulsarStandaloneStarter` the 
`PulsarStandaloneBuilder` does not evaluate the configuration file for the 
`ServiceConfiguration`, so only options for `LocalBookkeeperEnsemble` (via the 
`ServerConfiguration` class evaluation in `PulsarStandalone.start()`) will be 
read from the configuration file, all other (e.g. 
`managedLedgerDefaultEnsembleSize`) will be ignored.
   
   **Expected behavior**
   `PulsarStandaloneBuilder` uses a custom configuration if one is set with 
`withConfig()` and should create a new `ServiceConfiguration` instance only if 
no custom configuration was set.
   
   The configuration file is evaluated when `PulsarStandalone` is initialized 
by `PulsarStandaloneBuilder`.
   


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

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


Reply via email to