@Configuration @IntegrationComponentScan(value="tech.mystox.framework") @ComponentScan(value="tech.mystox.framework") @PropertySource(factory=tech.mystox.framework.config.YamlPropertySourceFactory.class, value="classpath:mqtt.yml") public class MqttConfig extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CHANNEL_NAME_IN
订阅的bean名称
|
static String |
CHANNEL_NAME_OUT
发布的bean名称
|
static String |
CHANNEL_REPLY
回复通道
|
| Constructor and Description |
|---|
MqttConfig() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.messaging.MessageHandler |
createMqttOutbound() |
org.eclipse.paho.client.mqttv3.MqttConnectOptions |
getMqttConnectOptions()
MQTT连接器选项
|
org.springframework.integration.core.MessageProducer |
inbound()
MQTT消息订阅绑定(消费者)
|
org.springframework.integration.mqtt.core.MqttPahoClientFactory |
mqttClientFactory()
MQTT客户端
|
org.springframework.messaging.MessageChannel |
mqttInboundChannel()
MQTT信息通道(消费者)
|
org.springframework.messaging.MessageHandler |
mqttOutbound()
MQTT消息处理器(生产者)
|
org.springframework.messaging.MessageChannel |
mqttOutboundChannel()
MQTT信息通道(生产者:订阅人)
|
org.springframework.messaging.MessageChannel |
mqttReplyChannel() |
org.springframework.integration.core.MessageProducer |
replyProducer()
MQTT消息订阅回复消息
|
public static final String CHANNEL_NAME_IN
public static final String CHANNEL_NAME_OUT
public static final String CHANNEL_REPLY
@Bean public org.eclipse.paho.client.mqttv3.MqttConnectOptions getMqttConnectOptions()
MqttConnectOptions@Bean public org.springframework.integration.mqtt.core.MqttPahoClientFactory mqttClientFactory()
MqttPahoClientFactory@Bean(name="mqttOutboundChannel") public org.springframework.messaging.MessageChannel mqttOutboundChannel()
MessageChannel@Bean(name="mqttReplyBoundChannel") public org.springframework.messaging.MessageChannel mqttReplyChannel()
@Bean(name="mqttInboundChannel") public org.springframework.messaging.MessageChannel mqttInboundChannel()
MessageChannel@Bean @ServiceActivator(inputChannel="mqttOutboundChannel") public org.springframework.messaging.MessageHandler mqttOutbound()
MessageHandlerpublic org.springframework.messaging.MessageHandler createMqttOutbound()
@Bean(value="inbound") public org.springframework.integration.core.MessageProducer inbound()
MessageProducer@Bean(value="replyProducer") public org.springframework.integration.core.MessageProducer replyProducer()
MessageProducerCopyright © 2025. All rights reserved.