package
1.1.6
Repository: https://github.com/qingcloudhx/core.git
Documentation: pkg.go.dev

# README

MQTT

This trigger allows you to listen to messages on MQTT.

Installation

Flogo CLI

flogo install github.com/qingcloudhx/edge-contrib/trigger/mqtt

Configuration

Settings:

NameTypeDescription
brokerstringThe broker URL - REQUIRED
idstringThe id of client - REQUIRED
usernamestringThe user's name
passwordstringThe user's password
storestringThe store for message persistence
cleanSessionboolClean session flag
keepAliveintKeep Alive time in seconds
autoReconnectboolEnable Auto-Reconnect
sslConfigobjectSSL configuration

sslConfig Object:

PropertyTypeDescription
skipVerifyboolSkip SSL validation, defaults to true
useSystemCertboolUse the systems root certificate file, defaults to true
caFilestringThe path to PEM encoded root certificates file
certFilestringThe path to PEM encoded client certificate
keyFilestringThe path to PEM encoded client key

Note: used if broker URI is ssl

Handler Settings

NameTypeDescription
topicarrayThe topic to listen on - REQUIRED
replyTopicstringThe topic to reply on
qosintThe Quality of Service

Output:

NameTypeDescription
messagestringThe message recieved

Reply:

NameTypeDescription
dataobjectThe data recieved

Example

{
  "id": "mqtt-trigger",
  "name": "Mqtt Trigger",
  "ref": "github.com/qingcloudhx/edge-contrib/trigger/mqtt",
  "settings": {
      "broker" : "tcp://localhost:1883",
     	"id":"client-1"
  },
  "handlers": {
    "settings": {
    	"topic": "flogo",
    	"qos": "0"
    }
  }
}

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author