vince
2023-11-08 96f7af2f3bf9a36dd48e0e6bf4f8a8ca1e31ed7d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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);
}