From f5f4101abf6276f18673a1ea2c08dafe48bc76a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B3=8A=E9=97=BB?= Date: Mon, 5 Dec 2022 11:49:36 +0800 Subject: [PATCH] Change default group constant to "annoymous" --- .../integration/outbound/RocketMQProduceFactory.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spring-cloud-alibaba-starters/spring-cloud-starter-stream-rocketmq/src/main/java/com/alibaba/cloud/stream/binder/rocketmq/integration/outbound/RocketMQProduceFactory.java b/spring-cloud-alibaba-starters/spring-cloud-starter-stream-rocketmq/src/main/java/com/alibaba/cloud/stream/binder/rocketmq/integration/outbound/RocketMQProduceFactory.java index 47533e75a..a3c45396b 100644 --- a/spring-cloud-alibaba-starters/spring-cloud-starter-stream-rocketmq/src/main/java/com/alibaba/cloud/stream/binder/rocketmq/integration/outbound/RocketMQProduceFactory.java +++ b/spring-cloud-alibaba-starters/spring-cloud-starter-stream-rocketmq/src/main/java/com/alibaba/cloud/stream/binder/rocketmq/integration/outbound/RocketMQProduceFactory.java @@ -21,6 +21,7 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicInteger; +import com.alibaba.cloud.stream.binder.rocketmq.constant.RocketMQConst; import com.alibaba.cloud.stream.binder.rocketmq.custom.RocketMQBeanContainerCache; import com.alibaba.cloud.stream.binder.rocketmq.properties.RocketMQProducerProperties; import com.alibaba.cloud.stream.binder.rocketmq.utils.RocketMQUtils; @@ -54,8 +55,6 @@ public final class RocketMQProduceFactory { private static final Map PRODUCER_REUSABLE_MAP = new ConcurrentHashMap<>(); - private static final String DEFAULT_GROUP_NAME = "DEFAULT_GROUP_NAME"; - private RocketMQProduceFactory() { } @@ -68,7 +67,7 @@ public final class RocketMQProduceFactory { public static DefaultMQProducer initRocketMQProducer(String topic, RocketMQProducerProperties producerProperties) { if (StringUtils.isEmpty(producerProperties.getGroup())) { - producerProperties.setGroup(DEFAULT_GROUP_NAME); + producerProperties.setGroup(RocketMQConst.DEFAULT_GROUP); } Assert.notNull(producerProperties.getGroup(), "Property 'group' is required - producerGroup");