Hi all,
I have many mqtt topics (around 5) to publish to (in the same broker). I wonder should I create one task for publishing to all mqtt topics or should I create one task for each mqtt topic?
As my understand, it should not create many task in RTOS. Anyone could give me some advice?
Thank you.
One task for many MQTT topics or one task just only for one MQTT topic
-
- Posts: 64
- Joined: Tue Jan 10, 2017 1:09 pm
Re: One task for many MQTT topics or one task just only for one MQTT topic
Hi!
"about 5" are not many tasks anyway it depends on the "logic" you're going to use to send data to the topics... if you're going to read all the sensors (for example) and update all the topics every n seconds, you could use just one task to do all the job... but if you want to independently read/send data to MQ broker, you may find it easier to use different tasks, one for each sensor/topic.
"about 5" are not many tasks anyway it depends on the "logic" you're going to use to send data to the topics... if you're going to read all the sensors (for example) and update all the topics every n seconds, you could use just one task to do all the job... but if you want to independently read/send data to MQ broker, you may find it easier to use different tasks, one for each sensor/topic.
Who is online
Users browsing this forum: No registered users and 132 guests