apache / apache/rocketmq-externals

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

Open
#849 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
4.6k
Forks
3k
Avg merge
2h 33m
Merged PRs (30d)
1

Description

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.
- [ ] - qos1 (at least one) between publisher client and MQTT broker
#850
- [ ] - qos1 (at least one) between MQTT broker and subscriber client
- [ ] - qos2 (exactly one) between publisher client and MQTT broker
- [ ] - qos2 (exactly one) between MQTT broker and subscriber client

2. 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](https://user-images.githubusercontent.com/34838783/141739117-51cd7c29-d6d1-4eb5-89b5-e4776a41c6a9.png)

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](https://user-images.githubusercontent.com/34838783/141744895-42c01b50-3ec6-4875-ab28-59d8d735e8bc.png)

3. 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](https://user-images.githubusercontent.com/34838783/141742916-8113f7be-6b27-4a71-acc1-4e520a49775e.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names the rocketmq-iot-bridge MQTT broker and links issue #850, but it does not identify source files, tests, or an entry point. Start by reviewing the broker module and the linked QoS1 work; done means the listed QoS1 and QoS2 publisher, broker, and subscriber semantics are implemented and covered by relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.