niceinfuture opened a new issue #849:
URL: https://github.com/apache/rocketmq-externals/issues/849


   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
   - 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/141740737-b7d6be3d-b3f5-485c-8882-10e89db66029.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)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to