emqx / MQTTX

A Powerful and All-in-One MQTT 5.0 client toolbox for Desktop, CLI and WebSocket.
https://mqttx.app
Apache License 2.0
3.79k stars 438 forks source link

[Feature] Set a default message format during Subscription #1591

Open V4G4X opened 6 months ago

V4G4X commented 6 months ago

Motivation

I have set the format type to JSON whenever I use MQTTX, which I often forget, and I have to copy-paste my messages somewhere to format them.

Would LOVE for MQTTX to remember what format a device receives messages in and automatically format it.

Detailed design

I understand different devices work with different types, and even a single device often works with different topics that expect different formats.

It would be very helpful if we could configure this at the topic level while subscribing.
For example, an optional dropdown for format here:

image

Alternatives

The alternative is manually setting the format on starting MQTTX here:

image

And If you forget, your message doesn't look pretty and you have to copy-paste and do it yourself.

ysfscream commented 6 months ago

Thank you for sharing your motivation and the detailed design idea for enhancing MQTTX.

Implementing different formats for encoding/decoding messages for various topics within a single device presents significant design challenges. We're carefully considering this functionality and hope to find an innovative solution to accommodate such versatility without compromising the software's performance or user experience.

Thank you once again for your feedback. It's insights like yours that help us improve and evolve MQTTX better to meet the needs of our diverse user base.

V4G4X commented 6 months ago

Glad to hear that @ysfscream. Thanks a lot for taking this up!