RSocket Broker Gateway MQTT

RSocket MQTT Gateway, 通过MQTT协议访问RSocket的Reactive服务。

Why MQTT with RSocket?

  • Let IoT easy to talk with Reactive Systems
  • Connect everything including backend App, Kafka, Data Streams.

MQTT 和 RSocket整合方案

  • MQTT的订阅对应于RSocket request/stream,将MQTT的Topic和一个request/stream的Flux进行关联
  • 反向推送: MQTT Gateway提供一个RSocket接口,负责接收发送给MQTT Gateway的消息,然后再将消息转发给MQTT订阅的客户端

当然也可以借助于其他的MQ系统,如MQTT Gateway负责和Kafka对接,处理来自Kafka的消息然后再转发给MQTT的订阅者。

MQTT 5 Features

  • Properties in the MQTT Header & Reason Codes: possibility to add custom key-value properties in the MQTT header, MQTT packets include Reason Codes. A Reason Code indicates that a pre-defined protocol error occurred.
  • CONNACK Return Codes for unsupported features
  • Additional MQTT Packet: new AUTH packet
  • New Data Type: UTF-8 String pairs
  • Bi-directional DISCONNECT packets
  • Using passwords without username

Netty 4.1.52 has MQTT5 support for netty-codec-mqtt.

References