账单-雪花主键-mq-合并topic

This commit is contained in:
2025-09-11 14:01:41 +08:00
parent 27e72bf8ec
commit e520926097
6 changed files with 3 additions and 101 deletions

View File

@@ -35,9 +35,6 @@ public interface MqConstant {
String BILL_RECORD_TOPIC = "bill_record_topic";
String BILL_RECORD_CONSUME_GROUP = "bill_record_consume_group";
String BILL_RECORD_V2_TOPIC = "bill_record_v2_topic";
String BILL_RECORD_V2_CONSUME_GROUP = "bill_record_v2_consume_group";
String BRAVO_TOPIC = "bravo_topic";
String BRAVO_CONSUME_GROUP = "bravo_consume_group";

View File

@@ -1,28 +0,0 @@
package com.accompany.mq.consumer;
import com.accompany.business.message.BillMessage;
import com.accompany.business.service.gift.BillMessageService;
import com.accompany.mq.constant.MqConstant;
import com.accompany.mq.listener.AbstractMessageListener;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;
@Slf4j
@Component
@ConditionalOnProperty(name = "spring.application.name", havingValue = "web")
@RocketMQMessageListener(topic = MqConstant.BILL_RECORD_V2_TOPIC, consumerGroup = MqConstant.BILL_RECORD_V2_CONSUME_GROUP)
public class BillMessageV2Consumer extends AbstractMessageListener<BillMessage> {
@Autowired
private BillMessageService billMessageService;
@Override
public void onMessage(BillMessage billMessage) {
log.info("onMessage billMessage v2: {}", billMessage.toString());
billMessageService.handleBillMessageV2(billMessage);
}
}