package com.fuyuanshen.global.mqtt.publish;


import com.fuyuanshen.global.mqtt.config.MqttGateway;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class MqttClientTest {
    @Autowired
    private MqttGateway mqttGateway;

    public void sendMsg() {
        mqttGateway.sendMsgToMqtt("command/894078/HBY670/864865082081523", "hello mqtt spring boot");
        log.info("message is send");

        mqttGateway.sendMsgToMqtt("report/894078/HBY670/864865082081523", "hello mqtt spring boot2");
        log.info("message is send2");
    }
}