This is an automated email from the ASF dual-hosted git repository.

mxsm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/eventmesh.git


The following commit(s) were added to refs/heads/master by this push:
     new 4369b945f [ISSUE #4288] Enable the nacos plugin to support namespace 
(#4293)
4369b945f is described below

commit 4369b945f9e6a2195d441fbc3eccd680edef9a86
Author: 枫桥 <[email protected]>
AuthorDate: Wed Jul 26 18:10:55 2023 +0800

    [ISSUE #4288] Enable the nacos plugin to support namespace (#4293)
---
 .../eventmesh/registry/nacos/config/NacosRegistryConfiguration.java    | 3 +++
 .../apache/eventmesh/registry/nacos/service/NacosRegistryService.java  | 2 ++
 eventmesh-runtime/conf/eventmesh.properties                            | 1 +
 3 files changed, 6 insertions(+)

diff --git 
a/eventmesh-registry-plugin/eventmesh-registry-nacos/src/main/java/org/apache/eventmesh/registry/nacos/config/NacosRegistryConfiguration.java
 
b/eventmesh-registry-plugin/eventmesh-registry-nacos/src/main/java/org/apache/eventmesh/registry/nacos/config/NacosRegistryConfiguration.java
index c22253f59..1c4a078eb 100644
--- 
a/eventmesh-registry-plugin/eventmesh-registry-nacos/src/main/java/org/apache/eventmesh/registry/nacos/config/NacosRegistryConfiguration.java
+++ 
b/eventmesh-registry-plugin/eventmesh-registry-nacos/src/main/java/org/apache/eventmesh/registry/nacos/config/NacosRegistryConfiguration.java
@@ -46,6 +46,9 @@ public class NacosRegistryConfiguration {
     @ConfigFiled(field = PropertyKeyConst.CLUSTER_NAME)
     private String clusterName;
 
+    @ConfigFiled(field = PropertyKeyConst.NAMESPACE)
+    private String namespace;
+
     @ConfigFiled(field = PropertyKeyConst.NAMING_POLLING_THREAD_COUNT)
     private Integer pollingThreadCount = 
Runtime.getRuntime().availableProcessors() / 2 + 1;
 
diff --git 
a/eventmesh-registry-plugin/eventmesh-registry-nacos/src/main/java/org/apache/eventmesh/registry/nacos/service/NacosRegistryService.java
 
b/eventmesh-registry-plugin/eventmesh-registry-nacos/src/main/java/org/apache/eventmesh/registry/nacos/service/NacosRegistryService.java
index 875a22a22..4fdca22fc 100644
--- 
a/eventmesh-registry-plugin/eventmesh-registry-nacos/src/main/java/org/apache/eventmesh/registry/nacos/service/NacosRegistryService.java
+++ 
b/eventmesh-registry-plugin/eventmesh-registry-nacos/src/main/java/org/apache/eventmesh/registry/nacos/service/NacosRegistryService.java
@@ -149,6 +149,8 @@ public class NacosRegistryService implements 
RegistryService {
         Optional.ofNullable(logLevel).ifPresent(value -> 
properties.put(UtilAndComs.NACOS_NAMING_LOG_LEVEL, logLevel));
         Integer pollingThreadCount = nacosConfig.getPollingThreadCount();
         Optional.ofNullable(pollingThreadCount).ifPresent(value -> 
properties.put(PropertyKeyConst.NAMING_POLLING_THREAD_COUNT, 
pollingThreadCount));
+        String namespace = nacosConfig.getNamespace();
+        Optional.ofNullable(namespace).ifPresent(value -> 
properties.put(PropertyKeyConst.NAMESPACE, namespace));
         return properties;
     }
 
diff --git a/eventmesh-runtime/conf/eventmesh.properties 
b/eventmesh-runtime/conf/eventmesh.properties
index 116256103..734332fd7 100644
--- a/eventmesh-runtime/conf/eventmesh.properties
+++ b/eventmesh-runtime/conf/eventmesh.properties
@@ -94,6 +94,7 @@ eventMesh.registry.plugin.password=nacos
 #eventMesh.registry.nacos.accessKey=
 #eventMesh.registry.nacos.secretKey=
 #eventMesh.registry.nacos.clusterName=
+#eventMesh.registry.nacos.namespace=
 # The default value is half of CPU's num
 #eventMesh.registry.nacos.namingPollingThreadCount=5
 


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

Reply via email to