hivemq / hivemq-mqtt-client

HiveMQ MQTT Client is an MQTT 5.0 and MQTT 3.1.1 compatible and feature-rich high-performance Java client library with different API flavours and backpressure support
https://hivemq.github.io/hivemq-mqtt-client/
Apache License 2.0
824 stars 153 forks source link

Fix message loss when forwarding messages from MQTTv5 to MQTTv3 in async mode #619

Closed inad9300 closed 4 months ago

inad9300 commented 4 months ago

Description

So far, a test case showing the message loss has been added. The actual fix needs to be developed (I won't venture myself into those waters).

Please, note that I haven't nor plan to sign the CLA. This pull request is just a convenient way for me to share my findings. As far as I am concerned, you are free to use of the code I provide in this pull request in whichever way you see fit. Please, copy it, modify it and complete it as you wish.

Related Issue

https://github.com/hivemq/hivemq-mqtt-client/issues/618

Type of Change

Checklist

cla-bot[bot] commented 4 months ago

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @inad9300 on file. In order for us to review and merge your code, please sign our Contributor License Agreement to get yourself added. You'll find the CLA and more information here: https://github.com/hivemq/hivemq-community/blob/master/CONTRIBUTING.adoc#contributor-license-agreement

pglombardo commented 4 months ago

Hi @inad9300 - thanks for the helpful bug report and tests! I'll take a closer look and post back next week.

SgtSilvio commented 4 months ago

Closing this as the issue you see is caused by a threading problem in the test code and is not an issue of the library. Feel free to comment and ask for clarifications.