Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rocketmq-iot-bridge]MQTT Broker quality level (qos1 and qos2) development list #849

Open
4 tasks
niceinfuture opened this issue Nov 15, 2021 · 0 comments
Open
4 tasks

Comments

@niceinfuture
Copy link

niceinfuture commented Nov 15, 2021

The projet of rocketmq-iot-bridge already supports qos 0, distributed mqtt broker will support qos1 and qos2, still base on rocketmq to achieve.

1.The module list of mqtt broker quality level.

  1. Overall semantics about mqtt quality level (qos1 and qos2)

2.1 qos1 (at least one)

  • The message sent of the sender, the receiver can receive at least once
  • Send the message at least once, if the sender don't receive the puack message, until the sender receives the confirmation packet.
  • If the sender fails to send the message, it will retry until the receiver receives the message, but the receiver may receive duplicate messages.
  • Qos1 between the publisher and the mqtt broker, between the mqtt broker and the subscriber are independent of each other.

image

2.2 qos2(exactly one)

  • The highest QoS level of mqtt message service level.
  • Send the message only once and ensure that it is sent successfully.
  • The message store in the local environment of the sender and receiver until the message is processed successfully.
  • If the sender fail to send message to receiver, it will continue to retry until receiver receive the message.And ensure the receiver will not receive the duplicate message due to retransmission the repeated message.

image

  1. iot-bridge MQTT broker development program.

3.1 Qos1 (at least one)
Since iot-bridge broker is implemented based on rocketmq, it is necessary to ensure the qos1 between the publisher client and rocektmq, between rocektmq and subscriber client.

3.1.1 The qos1 between the publisher client and rocektmq

  • MQTT broker receive publisher client's message and send it to rocketMQ, it will not send the suback protocol message to the publisher until it succeeds.
  • When MQTT broker send rocketMQ messages failed, Broker will periodically retry sending failed messages, can't more than the maximum retry of times (configurable)
  • qos1 has the possibility of message duplication.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant