pinxiong commented on a change in pull request #9138:
URL: https://github.com/apache/dubbo/pull/9138#discussion_r743669802



##########
File path: 
dubbo-test/dubbo-test-check/src/main/java/org/apache/dubbo/test/check/registrycenter/MockedRegistryCenter.java
##########
@@ -21,6 +21,16 @@
  */
 public class MockedRegistryCenter {
 
+    /**
+     * The first global zookeeper address
+     */
+    public static final String ZOOKEEPER_ADDRESS1 = 
"zookeeper://127.0.0.1:2181";

Review comment:
       > The global zookeeper address configs should not mixed with embedded zk 
server, extract them into a outer class. Furthermore, I thank it's better to 
append the zk server address and port configs to system props, such as:
   > 
   > ```
   > zookeeper.address=zookeeper://127.0.0.1:2181
   > zookeeper.port=2181
   > zookeeper.address.1=zookeeper://127.0.0.1:2181
   > zookeeper.port.1=2181
   > zookeeper.address.2=zookeeper://127.0.0.1:2182
   > zookeeper.port.2=2182
   > ```
   > 
   > So we can use them in Spring application.properties/yaml:
   > 
   > ```
   > dubbo.registry.address=${zookeeper.address}
   > dubbo.registries.second-registry.address=${zookeeper.address.2}
   > ```
   
   I think we need to support  that make `zookeeper port` as system props, 
don't do that for `zookeeper.address`, because the `zookeeper.address` depend 
on `zookeeper.port` 
   
   For `zookeeper.address`, we can set the system props config after zookeeper 
instance started.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to