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
Reconnection issues after a failure #377
Comments
Hi @freyssin
|
Hi Silvio, First of all, I want to thank you for the speed of your response. The broker is a proprietary software that has worked for many years with fuse and paho clients. I would like to validate it with the HiveMQ client because it offers an interesting and ambitious API. I understand that you cannot test and support all the MQTT brokers, which is why I give in my report a detailed description of the MQTT exchanges between the client and the server. From my point of view all the actions initiated by the broker seem comply with the MQTT specification, but it is possible that a detail escaped me. To allow you to easily analyze the situation, I am enclosing a WireShark capture containing the last packets exchanged before the failure, and all of the packets during reconnection (only 10 MQTT frames). The ZIP file also contains the CSV export of these frames: Thank you. |
Thank you for the information. Mqtt5Client.builder()
...
.addDisconnectedListener(context -> context.getCause().printStackTrace()) |
I have to investigate a little because the problem does not appear at each stop. After 3 attempts I got the following message (multiple times but without stacktrace): I will analyze the network traces to verify that we are in the same situation. |
This message helped. |
I have tested again with the snapshot version you suggested and the problem no longer seems to occur. |
@freyssin Thank you for your valuable and very detailed issue. This issue will be closed when the PR is merged. |
We have a client that subscribes on a topic with QoS2 in a durable session (cleanSession= false). This client uses the HiveMQ blocking API with automatic reconnection feature. This test works correctly in the absence of failure, but the subscriber stops receiving messages after stopping and restarting the server.
Expected behavior
We expect that the client reconnect to the server and continue to receive messages (no loss, no duplication).
Actual behavior
The client reconnects regularly to the server and then closes the connection. No message is received.
Detailed execution
Below the initialization code of the subscriber:
In the table below we reproduce the sequence of messages before and after the disconnection (If necessary we have a wireshark capture of this sequence). As explained below it seems that the problem comes from the takeover of the client.
The sequence 613-619 is then repeated regularly.
The behavior of the HiveMQ client seems surprising to me:
Details
java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)
The text was updated successfully, but these errors were encountered: