- Table of Contents
- Topics
- Subscribe to topic in netFIELD App Platform Connector
- Examples
- Troubleshooting
To subscribe to messages of a specific device, a combination of baseTopic
and a device topic must be used. Reference to image below. The baseTopic
can be fetched from netFIELD-API (View examples or swagger of API).
The following diagram represents the workflow and structure of topics inside the netFIELD-Data-Service system.
To subscribe to a topic and start receiving its messages, you can do that from the netFIELD platform or locally on the device using the netFIELD App Platform Connector.
Provided examples connect to the device local MQTT broker, subscribe a topic to receive its messages, and publish a user message on a topic.
The following sequence diagrm illustrates performed interactions:
MQTTnet is used as library to connect to a broker via MQTT to receive and publish messages.
MQTT.js is used to connect to broker to receive and publish messages.
Eclipse Paho client library for MQTT Broker connection to receive and publish messages. https://www.eclipse.org/paho/index.php?page=clients/python/index.php
MQTT client disconnects (imediately).
Multiple possible issues:
- Subscriptions are performed, that are not permitted.
- TLS is not used.
- Publishes to the broker are performed that are not permitted.