package org.jeecg.config.mqtt;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class MqttMessageSender {
    @Autowired
    private MqttGateway mqttGateway;

    public void send(String topic, String message) {
        log.info("[发送消息的topic]：{} - [发送的消息]：{}", topic,message);
        mqttGateway.sendToMqtt(topic, message);
    }

}
