Replies: 1 comment 2 replies
-
That's a trade-off yes ;-) But in the library you use to listen, you can use # to listen to all topics under a parent. The current implementation is partly driven by the Home Assistant integration with Auto Discovery. It is more efficient to act on separated topics than a few ones with a big json payload inside from a HA point of view. But from YaSolR point of view, In terms of perf, it would be better to have fewer topics with a bigger json content to send them faster. But the potential issue is message fragmentation regarding the allowed buffer. The MQTT buffer would need to grow, thus taking more heap. I hesitated on that, so I chose to go with specific topics per value because HA needed that, so there was a valid use case. But like you said it really depends on what is consuming them. Someone might argue the opposite as you ;-) What use case you have that makes it complicated the way it is right now ? edit well defined topics also allow optimisations using the retain flag (which is used in YaSolR for some topics), and is also considered a best practice over bigger payload of data (which requires a format per definition) - https://www.hivemq.com/blog/mqtt-essentials-part-5-mqtt-topics-best-practices/ |
Beta Was this translation helpful? Give feedback.
-
Hi @mathieucarbou,
Is there an option to set all related data send into one shot on MQTT topic
I mean for example just one payload into mytopic/grid containing all grid data in JSON instead of one by one?
Sometimes split values are nice and sometime better to have only one, really depending on who is consuming data, to be honest, I need both :-)
Beta Was this translation helpful? Give feedback.
All reactions