Skip to content

Messages lost when using both MQTTv3 and MQTTv5 clients in async mode #618

Open
@inad9300

Description

@inad9300

🐛 Bug Report

I have a setup where I receive messages from a MQTTv5 broker at a rate of one per second, and have to forward them to a MQTTv3 broker. As such, I have a software component with two clients, one connected to each broker, using the asynchronous API flavor.

In this scenario, the MQTTv5 client receives all messages well, but sending those same messages through the MQTTv3 client behaves in such a way that the sending of 8 consecutive messages works, then the 9th times out, repeatedly.

🔬 How To Reproduce

I have added a test case reproducing the problem in #619. It shows how the reactive API flavor handles the task well, whereas the asynchronous one is only able to send a few messages before breaking. I have not added a test using the blocking API, but I have been able to test it in my own project and it works too.

I believe the same problem exists when going from MQTTv3 to MQTTv5. Perhaps the version does not matter. I also don't know if two async clients are necessary to reproduce the issue. These are all tests worth doing and automating, in my opinion.

Environment

Ubuntu 22.04.

📈 Expected behavior

All messages should arrive, as is the case with the other API flavors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions