MQTT payload includes ALL Tags of view, want to create one topic for each Tag
Hi. When i publish data coming from a view, using jsonmqtt, via publisher, i am getting one topic on the MQTT Server including all datapoints.
Is there a configuration possibility to publish datapoints to single topics?
I want to get 500 topics when the view have 500 datapoints listed
6 replies
-
Hi ,
You can drill all the way down the tagpath excluding the tag name. In that case, each tag would need to have a unique branch above it in order to publish a single tag on a single topic. Now, having said that, we've never tested this many publisher sessions. I don't know how it would handle 500 sessions. Can I ask what the use case is for having a single tag per topic?
-
I would add that this would benefit publishing into an existing MQTT topic space. If I already have a structure like "enterprise/site/line1/“ it would be useful to publish asset tags such as "line1.boiler.temperature" and "line1.production_counter" into that same hierarchy.
-
i saw this post the other day and made this.
https://github.com/huntermatuse/simple-canary-mqtt-forwarder/tree/main
in my limited testing i was able to consistently push around 300 tags per 1 second cycles with bursts up to 5000 tags. my suggestion would be to make a new view with the tags you wanted to push to the MQTT broker and point this at that view specifically. this will use the exact tag paths for the topic.
it uses live data endpoints from Canary's read api but, requires anonymous access enabled right now.