Browse Source

使用rocketmq注解

master
jianjun 4 years ago
parent
commit
dd66238959
  1. 3
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/mq/GroupAchieventConsumerListener.java
  2. 2
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/mq/type1/RocketMQConsumerRegister.java

3
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/mq/GroupAchieventConsumerListener.java

@ -9,6 +9,7 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* desc: 小组成就mq监听
@ -18,7 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
* @version: 1.0
*/
@Slf4j
//@Component
@Component
@RocketMQMessageListener(topic = "group_achievement", consumerGroup = ConsomerGroupConstants.GROUP_ACHIEVEMENT_COMPONENTS_GROUP)
public class GroupAchieventConsumerListener implements RocketMQListener<GroupAchievementMQMsg> {
@Autowired

2
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/mq/type1/RocketMQConsumerRegister.java

@ -13,7 +13,7 @@ import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
@Slf4j
@Component
//@Component
public class RocketMQConsumerRegister {
@Value("${rocketmq.name-server}")

Loading…
Cancel
Save