package com.xinda.mq.redischannel.producer;

import com.xinda.common.core.mq.DeviceReportBo;
import com.xinda.mqttclient.IEmqxMessageProducer;
import org.springframework.stereotype.Component;

/**
 * @author bill
 */
@Component
public class EmqxMessageProducer implements IEmqxMessageProducer {


    @Override
    public void sendEmqxMessage(String topicName, DeviceReportBo deviceReportBo) {
        if (topicName.contains("property/post")){
            MessageProducer.sendPublishMsg(deviceReportBo);
        } else {
            MessageProducer.sendOtherMsg(deviceReportBo);
        }
    }
}
