Search in sources :

Example 1 with MqttUnsubscribeMessagHandler

use of org.apache.rocketmq.iot.protocol.mqtt.handler.downstream.impl.MqttUnsubscribeMessagHandler in project rocketmq-externals by apache.

the class MQTTBridge method registerMessageHandlers.

private void registerMessageHandlers() {
    messageDispatcher.registerHandler(Message.Type.MQTT_CONNECT, new MqttConnectMessageHandler(clientManager));
    messageDispatcher.registerHandler(Message.Type.MQTT_DISCONNECT, new MqttDisconnectMessageHandler(clientManager));
    messageDispatcher.registerHandler(Message.Type.MQTT_PUBLISH, new MqttMessageForwarder(subscriptionStore));
    // TODO qos 1/2 PUBLISH
    // TODO qos 1: PUBACK
    // TODO qos 2: PUBREC
    // TODO qos 2: PUBREL
    // TODO qos 2: PUBCOMP
    messageDispatcher.registerHandler(Message.Type.MQTT_PINGREQ, new MqttPingreqMessageHandler());
    messageDispatcher.registerHandler(Message.Type.MQTT_SUBSCRIBE, new MqttSubscribeMessageHandler(subscriptionStore));
    messageDispatcher.registerHandler(Message.Type.MQTT_UNSUBSCRIBE, new MqttUnsubscribeMessagHandler(subscriptionStore));
}
Also used : MqttDisconnectMessageHandler(org.apache.rocketmq.iot.protocol.mqtt.handler.downstream.impl.MqttDisconnectMessageHandler) MqttMessageForwarder(org.apache.rocketmq.iot.protocol.mqtt.handler.downstream.impl.MqttMessageForwarder) MqttUnsubscribeMessagHandler(org.apache.rocketmq.iot.protocol.mqtt.handler.downstream.impl.MqttUnsubscribeMessagHandler) MqttSubscribeMessageHandler(org.apache.rocketmq.iot.protocol.mqtt.handler.downstream.impl.MqttSubscribeMessageHandler) MqttPingreqMessageHandler(org.apache.rocketmq.iot.protocol.mqtt.handler.downstream.impl.MqttPingreqMessageHandler) MqttConnectMessageHandler(org.apache.rocketmq.iot.protocol.mqtt.handler.downstream.impl.MqttConnectMessageHandler)

Aggregations

MqttConnectMessageHandler (org.apache.rocketmq.iot.protocol.mqtt.handler.downstream.impl.MqttConnectMessageHandler)1 MqttDisconnectMessageHandler (org.apache.rocketmq.iot.protocol.mqtt.handler.downstream.impl.MqttDisconnectMessageHandler)1 MqttMessageForwarder (org.apache.rocketmq.iot.protocol.mqtt.handler.downstream.impl.MqttMessageForwarder)1 MqttPingreqMessageHandler (org.apache.rocketmq.iot.protocol.mqtt.handler.downstream.impl.MqttPingreqMessageHandler)1 MqttSubscribeMessageHandler (org.apache.rocketmq.iot.protocol.mqtt.handler.downstream.impl.MqttSubscribeMessageHandler)1 MqttUnsubscribeMessagHandler (org.apache.rocketmq.iot.protocol.mqtt.handler.downstream.impl.MqttUnsubscribeMessagHandler)1