You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by pa...@apache.org on 2022/08/16 09:30:02 UTC
[rocketmq-spring] branch master updated: [ISSUE #444] Add default consumer namespace to DefaultRocketMQListenerContainer. (#444)
This is an automated email from the ASF dual-hosted git repository.
panzhi33 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-spring.git
The following commit(s) were added to refs/heads/master by this push:
new 4b299b8 [ISSUE #444] Add default consumer namespace to DefaultRocketMQListenerContainer. (#444)
new 251a403 Merge pull request #456 from zhouhai22/fix_default_namespace
4b299b8 is described below
commit 4b299b8575dc9060dcecc5113fb7c21aa0fdf8b1
Author: zhouchunhai <zh...@cmss.chinamobile.com>
AuthorDate: Sun May 8 09:20:22 2022 +0800
[ISSUE #444] Add default consumer namespace to DefaultRocketMQListenerContainer. (#444)
---
.../spring/autoconfigure/ListenerContainerConfiguration.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/autoconfigure/ListenerContainerConfiguration.java b/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/autoconfigure/ListenerContainerConfiguration.java
index 5bd6413..7544b20 100644
--- a/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/autoconfigure/ListenerContainerConfiguration.java
+++ b/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/autoconfigure/ListenerContainerConfiguration.java
@@ -155,6 +155,11 @@ public class ListenerContainerConfiguration implements ApplicationContextAware,
container.setMessageConverter(rocketMQMessageConverter.getMessageConverter());
container.setName(name);
+ // set default namespace
+ String namespace = rocketMQProperties.getConsumer().getNamespace();
+ if (StringUtils.isEmpty(container.getNamespace()) && !StringUtils.isEmpty(namespace)) {
+ container.setNamespace(namespace);
+ }
return container;
}