Skip to content
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

[Bug] data is lost when receiving data. #1770

Closed
johnzhy opened this issue Sep 27, 2024 · 5 comments
Closed

[Bug] data is lost when receiving data. #1770

johnzhy opened this issue Sep 27, 2024 · 5 comments
Assignees
Labels
bug Something isn't working desktop MQTTX Desktop
Milestone

Comments

@johnzhy
Copy link

johnzhy commented Sep 27, 2024

What did I do

同时订阅2个主题,设备每次连续发布这两个主题的数据,mqttx接收并显示这两个主题的消息

What happened

结果会出现只接收到一条主题数据的情况。
mqtt服务器记录的两个主题数据条数一致,设备端显示所有主题发布成功,更换
mqtt.fx后,不再出现丢失数据的情况。

Expected

接收所有数据

Environment

  • OS: Windows 11 23H2
  • MQTTX version, e.g. v1.10.1

More detail

@johnzhy johnzhy added the bug Something isn't working label Sep 27, 2024
@github-project-automation github-project-automation bot moved this to Backlog in MQTTX Sep 27, 2024
@ysfscream ysfscream self-assigned this Sep 27, 2024
@ysfscream ysfscream added the desktop MQTTX Desktop label Sep 27, 2024
@ysfscream ysfscream moved this from Backlog to TO DO in MQTTX Sep 27, 2024
@ysfscream ysfscream added this to the v1.11.0 milestone Sep 27, 2024
@ysfscream ysfscream changed the title [Bug] 接收数据偶发丢失数据 [Bug] data is lost when receiving data. Oct 23, 2024
@ysfscream ysfscream modified the milestones: v1.11.0, v1.11.1 Oct 23, 2024
@ysfscream
Copy link
Member

Hi there! Sorry for replying so late. I will reproduce this issue again. I am publishing different topics with 100 messages per topic and QoS 0. The broker is deployed in my cloud environment. MQTTX will receive a total of 200 messages from different topics. However, I still can't reproduce this issue. Could you please provide more detailed information about this bug? Thanks!

image image image

@mobiusy
Copy link

mobiusy commented Dec 4, 2024

MQTTX Version: v1.11.0

Same issue, reproduce steps:

  1. Subscribe two wildcards topic
    image
    image
  2. Send about 10 messages to one of the topics, e.g. wdp5-backend/+/delete-user-model-task-status/+
    The first 5 messages are sent to "wdp5-backend/Team_13336_3a34b5/user-model-task-status/1a7c79c37f4845e3b3ef0e3c9d48acf6".
    The latter 5 messages are sent to "wdp5-backend/Team_13336_3a34b5/user-model-task-status/afe469aa4a2d4a0a9c4e9e2bd10349a2".
  3. Message not fully displayed in the message box, only first 6 messages displayed
    image
  4. Switch the tab on the left, the rest messages appeared

image

So, I guess all the messages are received, but some of them are not displayed in the message box.

@ysfscream
Copy link
Member

Hi! Thanks for the detailed reproduction steps. I've tried to reproduce this issue but haven't been successful.

Could you provide a more detailed way to consistently reproduce this? For example:

  • Message payload
  • Publishing frequency
  • QoS level
  • Any specific broker settings

Also, I'd like to understand what's happening in MQTTX when the messages are not rendered. Could you try enabling debug logs when reproducing this issue? This would help us track down where exactly the rendering is failing.

Let me know if you can provide any additional details. Thanks for helping improve MQTTX!

@mobiusy
Copy link

mobiusy commented Dec 10, 2024

Hi! Thanks for the detailed reproduction steps. I've tried to reproduce this issue but haven't been successful.

Could you provide a more detailed way to consistently reproduce this? For example:

  • Message payload
  • Publishing frequency
  • QoS level
  • Any specific broker settings

Also, I'd like to understand what's happening in MQTTX when the messages are not rendered. Could you try enabling debug logs when reproducing this issue? This would help us track down where exactly the rendering is failing.

Let me know if you can provide any additional details. Thanks for helping improve MQTTX!

OK, thanks for your reply, I will address more details:

  1. Add MQTTX Connection
    image

  2. Subscribe two wildcard topics:
    image
    image

  3. In another mqtt client, connect the same emqx server
    image

  4. Send 6 messages to wdp5-backend/100/delete-user-model-task-status/001 concurrently

  5. Send 6 messages to wdp5-backend/100/delete-user-model-v2-task-status/001 concurrently
    Message body of step 4 & 5:

{
    "allModels": [
        {
            "folderId": "",
            "models": [
                "a5e192aa298ce6d64c21eaedb9918c79",
                "0bc53f7cbf781d9534da503bf81919a2",
                "ff213cf4cdb71ff46a9b1ce41e7b18df",
                "826be5644e29c33aa5fdb06c7c6f7092"
            ]
        },
        {
            "folderId": "54b3b49a3d775b914d18ecd9c8860d77",
            "models": [
                "ae511be1d40d88f0243030fe92a82880",
                "4378273065bf4a13846d465ba3242c57"
            ]
        },
        {
            "folderId": "44b3b49a3d775b914d18ecd9c8860d78",
            "models": [
                "459e09c285ec4a1d55a1d256625b70a7",
                "ec030638eebd2536e7f1bc701810caf8"
            ]
        }
    ],
    "modelProcessDetail": {
        "processed": [
            "a5e192aa298ce6d64c21eaedb9918c79",
            "0bc53f7cbf781d9534da503bf81919a2",
            "ff213cf4cdb71ff46a9b1ce41e7b18df",
            "826be5644e29c33aa5fdb06c7c6f7092",
            "ae511be1d40d88f0243030fe92a82880",
            "4378273065bf4a13846d465ba3242c57",
            "459e09c285ec4a1d55a1d256625b70a7",
            "ec030638eebd2536e7f1bc701810caf8"
        ],
        "deleted": [
            "a5e192aa298ce6d64c21eaedb9918c79",
            "0bc53f7cbf781d9534da503bf81919a2",
            "ff213cf4cdb71ff46a9b1ce41e7b18df",
            "826be5644e29c33aa5fdb06c7c6f7092",
            "ae511be1d40d88f0243030fe92a82880",
            "459e09c285ec4a1d55a1d256625b70a7",
            "ec030638eebd2536e7f1bc701810caf8"
        ]
    },
    "folderProcessDetail": {
        "processed": [
            "54b3b49a3d775b914d18ecd9c8860d77",
            "44b3b49a3d775b914d18ecd9c8860d78"
        ],
        "deleted": ["44b3b49a3d775b914d18ecd9c8860d78"]
    },
    "cannotDeleteModels": [
        {
            "seedId": "4378273065bf4a13846d465ba3242c57",
            "container": ["container A"],
            "case": ["Case A"]
        }
    ],
    "cannotDeleteFolders": ["54b3b49a3d775b914d18ecd9c8860d77"]
}

image
6. MQTTX client shows 12 messages received, but 7 messages displayed in the message box
image

Please see the video:
https://github.com/user-attachments/assets/f1a5ad75-2233-45fc-902f-859defd6504f

  1. debug log
    mqttx_12_10.log

Supplementary explanation:

  1. Publishing messages slowly will not trigger this issue
  2. I do more research. Only one subscription can also have this issue as soon as messages received instantaneous

@ysfscream
Copy link
Member

ysfscream commented Dec 13, 2024

Thank you all, it should have been fixed in https://github.com/emqx/MQTTX/releases/tag/v1.11.1, if there are new problems I will reopen this issue.

@github-project-automation github-project-automation bot moved this from In Progress to Done in MQTTX Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working desktop MQTTX Desktop
Projects
Status: Done
Development

No branches or pull requests

3 participants