chore(server): 调整 orgmanax 的默认 topic为 topic_organizational_${spring_profiles.active}

This commit is contained in:
周敏 2025-01-08 14:41:51 +08:00
parent 879a21a9af
commit 481d1b5016

View File

@ -20,10 +20,10 @@ import org.springframework.stereotype.Component;
public class RocketMQEventConfig {
public static final String DEFAULT_MODULE = "orgmanax-server";
@Value("topic_${spring.application.name}_${spring.profiles.active}")
@Value("topic_organizational_${spring.profiles.active}")
private String currentTopic;
@Value("topic_${spring.application.name}_retry_${spring.profiles.active}")
@Value("topic_organizational_retry_${spring.profiles.active}")
private String currentRetryTopic;
/**
@ -34,7 +34,7 @@ public class RocketMQEventConfig {
@Component
// XXX: consumerGroup 必须全局唯一. RocketMQ要求同一个Consumer Group的消费者必须要拥有相同的注册信息即必须要听一样的topic(并且tag也一样)
// 这里通个添加 topic信息来保证唯一.
@RocketMQMessageListener(topic = "topic_${spring.application.name}_${spring.profiles.active}",
@RocketMQMessageListener(topic = "topic_organizational_${spring.profiles.active}",
consumerGroup = "GID_${spring.application.name}_${spring.application.name}_${spring.profiles.active}",
consumeMode = ConsumeMode.ORDERLY, enableMsgTrace = false)
public static class Listener extends DefaultRocketMQListener {
@ -47,7 +47,7 @@ public class RocketMQEventConfig {
@Component
// XXX: consumerGroup 必须全局唯一. RocketMQ要求同一个Consumer Group的消费者必须要拥有相同的注册信息即必须要听一样的topic(并且tag也一样)
// 这里通个添加 topic信息来保证唯一.
@RocketMQMessageListener(topic = "topic_${spring.application.name}_retry_${spring.profiles.active}",
@RocketMQMessageListener(topic = "topic_organizational_retry_${spring.profiles.active}",
consumerGroup = "GID_${spring.application.name}_retry_${spring.application.name}_${spring.profiles.active}",
consumeMode = ConsumeMode.ORDERLY, enableMsgTrace = false)
public static class RetryListener extends DefaultRocketMQListener {