package com.iformall.mq.impl;

import com.iformall.mq.MqBaseConsumer;
import com.iformall.mq.MQConfig;
import lombok.extern.slf4j.Slf4j;
import org.rocketmq.starter.annotation.RocketMQListener;
import org.rocketmq.starter.annotation.RocketMQMessage;
import org.springframework.context.annotation.Profile;

@Slf4j
@Profile(MQConfig.Impl.ROCKET_MQ)
@RocketMQListener(topic = "topic-1",consumeThreadMax=100,consumeThreadMin = 20)
public class RocketMqConsumer extends MqBaseConsumer {

    @RocketMQMessage(messageClass = String.class, tag = "tag-1")
    public void onMessage(String message) {
        doMessage(message);
    }
}
