MQTTX icon indicating copy to clipboard operation
MQTTX copied to clipboard

[Feature] Add the option to automatically collapse large messages

Open TommyDuc opened this issue 2 years ago • 5 comments

Motivation

Large messages (read about ~100MB) are fetched and displayed as is by MQTTX. Not only is this not practical but it also makes the application lag and even crash.

Detailed design

There should be a limit for the maximum length for messages being displayed. If that limit was exceeded then the message should be automatically collapsed.

TommyDuc avatar Feb 07 '23 20:02 TommyDuc

Thank you for bringing this to our attention. We hadn't considered the display issue with large messages before. I will take your suggestion into account and work to implement it as soon as possible.

Red-Asuka avatar Feb 08 '23 01:02 Red-Asuka

Thanks @Red-Asuka !

TommyDuc avatar Feb 08 '23 17:02 TommyDuc

@TommyDuc Hi, before we optimize this, could I ask you two questions?

  1. What is the scenario that requires such a large size of data?
  2. What is the current performance and show of MQTT X when receiving and sending this large amount of data?

We want to be able to reproduce this when optimizing fully. Thanks

ysfscream avatar Feb 09 '23 01:02 ysfscream

@ysfscream

  1. The scenario is that the MQTT broker is used to transfer files (read firmware updates). We know that MQTT was not meant to transfer files but it does support messages up to 256MB :) and so it was quick and cheap way to do it.
  2. For uploading I haven't tried it but when file-messages, which are often retained, then opening MQTT X on the file topic causes it to freeze for multiple minutes or even crash.

TommyDuc avatar Feb 10 '23 18:02 TommyDuc

OK. Thanks for your details. We will optimize this data display, but you can wait for the large file transfer function of EMQX, which will work very well for you!

ysfscream avatar Feb 13 '23 09:02 ysfscream

It's updated to https://github.com/emqx/MQTTX/releases/tag/v1.10.0, welcome to try and thanks again.

ysfscream avatar Jun 07 '24 09:06 ysfscream