package com.zt.plat.module.qms.mq.producer;

import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

import com.zt.plat.module.qms.mq.SampleEntrustRegistrationAssayCompleteMessage;

import jakarta.annotation.Resource;

/**
 * <b>SampleEntrustRegistrationAssayCompleteProducer</b>
 * 样品委托登记分析完成消息生产者
 */
@Component
public class SampleEntrustRegistrationAssayCompleteProducer {

    @Resource
    private RocketMQTemplate rocketMQTemplate;
    
    /**
     * 发送到消息队列
     * @param message
     */
    @Async
    public void sendMessage(SampleEntrustRegistrationAssayCompleteMessage message) {
//    	rocketMQTemplate.syncSend(SampleEntrustRegistrationAssayCompleteMessage.TOPIC, message);
    	rocketMQTemplate.syncSendDelayTimeSeconds(SampleEntrustRegistrationAssayCompleteMessage.TOPIC, message, 15);
    }
}
