Best practices for Thingworx and MQTT
Hello everybody,
I have an application to monitoring a list of rooms with some attribute as temperature, humidity, power consumption, etc. and I will use MQTT to send the data to Thingworx Foundation. Actually, I have 2 solutions to do:
- Solution 1: Using MQTT extension in market place. The workflow is as following: Sensor -> Gateway (Publish) -> MQTT Broker -> MQTT Extension (Subscriber). Then, by decoding the data in json (I plan to have only one MQTT client instance and subscriber all topic, then, a message includes thing name, attribute and values in pair), I will set directly the thing attribute. e.g. Things[A].attribute = MQTTThing.message.attribute_value. I am facing with problem in link , so, I assume that I can do it without any problem.
- Solution 2: Using Thingworx Industrial Connectivity / Kepware ThingWorx. Sensor -> Gateway (Publish) -> MQTT Broker -> Kepware -> Thingworx. The Kepware will use as MQTT client and send data to Thingworx using "Always On" connection.
Hence, which solution is the best practices for using MQTT with Thingworx ??
With the scale of system, a technique support of PTC recommends me to use the solution 2. As he said, because the MQTT Extension receives data from broker and after that, MQTT Extension shall update the Thing attribute by using REST API. So, it causes high load in the server because of http request header. But I didn't find any documents mentioned about this information. I hope someone know about the Thingworx structure can confirm this information is right or wrong.
And with the solution 2, are there any tools to scale the problem ? Because as my experiment with Kepware and PLC, I need to map each tag in PLC to Thing attribute. If I scale my problem to 1000 rooms, it is a nightmare if I do it manually..

