MQTT node by Kumologica integrates with any MQTT broker platform for publishing the events.
For MQTT node to work properly, you need to have a MQTT broker instance running on-premise or on cloud.
To install the node from designer:
- Go to Add more nodes option on the palette section.
- Check for the MQTT node and click install.
- Once installed, the designer is required to be restarted.
To install the node from CLI:
- Go to your project workspace where you can see your
- Run the below give npm command.
npm i @kumologica/kumologica-contrib-mqtt
# Technical Details
- Message (Optional)
Message to be published to the MQTT broker platform.
- Topic (optional)
MQTT topic to which the event to be published.
- ClientId (optional)
Unique Id which identifies the client which published the message to the MQTT topic.
- Username (optional)
Username for authenticating with the MQTT broker platform.
- Password (optional)
Password for authenticating with the MQTT broker platform.
- Host (Required)
Hostname of the MQTT broker to connect.
- Port (Required)
Port number of the MQTT broker to connect.
- ReconPeriod (Optional)
Reconnection retry interval.
- Keepalive (Optional)
Keep alive ensure that the connection between the broker and the client is still open.
- ProtocolId (Optional)
MQTT protocol Id.
- Version (Optional)
Version of the MQTT protocol to follow.
- Clean (Optional)
This enable to clean the session.
- Encoding (Optional)
Message encoding default is
512 mb is the minimum memory requirement for your AWS lambda deployment when using MQTT node.
MQTT node throws the following exception.
- MQTT Client Failed
Payload and variables are not enriched or overwritten by this node.
# Develop a Service
Drag a drop an EventListener node from the palette to the canvas. Open the settings, configure the following and Save.
Display Name : POST /send Event Source : Amazon API gateway Verb : POST URL : /send
Add a logger from the palette to the canvas and set the Message as
From the iot category add MQTT node to the canvas. Open the settings, configure the following and Save.
Message : msg.payload Topic : Your topic in MQTT broker Host : Your MQTT broker host Port : Your MQTT broker port
Wire the EventListener node to the Logger node and wire logger node to MQTT node.
Add EventListener End node from the palette to the canvas. Open the settings, configure the following and Save.
Content-Type : application/json Payload : Completed
Wire the MQTT node to EventListener End node.