jiazx0107@163.com
2023-11-08 a31a452b9999ba3c811c36b5cb1b3ec0c18d037d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package com.fzzy.mqtt;
 
 
import org.springframework.integration.annotation.MessagingGateway;
import org.springframework.integration.mqtt.support.MqttHeaders;
import org.springframework.messaging.handler.annotation.Header;
import org.springframework.stereotype.Service;
 
/**
 * 推送接口
 */
@Service
@MessagingGateway(defaultRequestChannel = "mqttOutboundChannel")
public interface MqttGatewayService {
 
    void sendToMqtt(@Header(MqttHeaders.TOPIC) String topic01, String sendData);
}