Connect an external MQTT client
This guide explains how to connect an external MQTT client to your Heisenware tenant. You will learn to send data to Heisenware and receive data from Heisenware via MQTT.
Learn how to connect an external MQTT client to your Heisenware tenant to send data to and receive data from your Apps.
Initial setup and sending data (ingest)
Create a Heisenware account
If you do not have an account, sign up to get started.
Generate client credentials
Open the App Manager and navigate to Integrations.
Add a new MQTT integration to generate a dedicated username and password for your external MQTT client.
Configure your MQTT client
Configure your external client using the connection details and instructions from the MQTT Client connector documentation. Use the username and password you generated in the previous step.
Subscribe using the internal MQTT client
Each Heisenware tenant includes a default internal MQTT client.
Open the App Builder for your App.
Locate the
onJsonMessageoronStringMessagefunction of the internal client in the Function Explorer and drag it onto the canvas.Enter your active topic name in the function settings.
Trigger the function manually to subscribe the App to the topic.
Run the App in test mode to view incoming messages in the event output.
Process incoming data
To work with incoming messages in your App's data flow, connect the event handler output to a memory function (part of the Data processing utility class).
The memory function converts the incoming real-time stream into a standard function output. From there, you can modify, store, forward, or visualize the payload as needed.

Receive data on your client (egress)
Complete the initial setup
Ensure you complete steps 1 through 3 of the initial setup to configure your client credentials before proceeding with egress configuration.
Publish data to the internal broker
Use the publishJson or publishString function in the Backend Builder to publish data to a specific topic.
You can enter a static message manually or bind dynamic data to the input box.
Generate test data
Use the Data simulation class to generate dynamic test values. You can format this simulated data using a modifier extension node before publishing.
Last updated
Was this helpful?