77
88[ ![ NPM version] [ npm-image ]] [ npm-url ] [ ![ Downloads] [ downloads-image ]] [ npm-url ] [ ![ Dependency Status] [ david-badge ]] [ david-badge-url ]
99<a href =" #badge " >
10- <img alt =" code style: prettier " src =" https://img.shields.io/badge/code_style-prettier-ff69b4.svg " >
10+ <img alt =" code style: prettier " src =" https://img.shields.io/badge/code_style-prettier-ff69b4.svg " >
1111</a >
1212
1313# Executor for [ Runnerty] : MQTT
14+
1415Module MQTT Publisher.
1516This is a wrapper from the [ MQTT.js] ( https://github.com/mqttjs/MQTT.js )
1617
1718### Installation:
19+
20+ Through NPM
21+
1822``` bash
1923npm i @runnerty/executor-mqtt
2024```
2125
26+ You can also add modules to your project with [ runnerty-cli]
27+
28+ ``` bash
29+ npx runnerty-cli add @runnerty/executor-mqtt
30+ ```
31+
32+ This command installs the module in your project, adds example configuration in your ` config.json ` and creates an example plan of use.
33+
34+ If you have installed [ runnerty-cli] globally you can include the module with this command:
35+
36+ ``` bash
37+ rty add @runnerty/executor-mqtt
38+ ```
39+
2240### Configuration:
41+
2342Add in [ config.json] :
43+
2444##### Simple:
45+
2546``` json
2647{
2748 "id" : " mqtt_default" ,
@@ -31,6 +52,7 @@ Add in [config.json]:
3152```
3253
3354##### All parameters:
55+
3456``` json
3557{
3658 "id" : " mqtt_default" ,
@@ -54,26 +76,29 @@ Add in [config.json]:
5476 "tlsCAFile" : " ./my_cert.ca" ,
5577 "rejectUnauthorized" : false ,
5678 "properties" : {
57- "sessionExpiryInterval" : 3600 ,
58- "receiveMaximum" : 1024 ,
59- "maximumPacketSize" : 32 ,
60- "topicAliasMaximum" :32 ,
61- "requestResponseInformation" : true ,
62- "userProperties" : {
63- "some" : " value"
64- },
65- "authenticationMethod" : " auth_method" ,
66- "authPacket" : {
67- "some" : " value"
68- },
69- "resubscribe" : true
79+ "sessionExpiryInterval" : 3600 ,
80+ "receiveMaximum" : 1024 ,
81+ "maximumPacketSize" : 32 ,
82+ "topicAliasMaximum" : 32 ,
83+ "requestResponseInformation" : true ,
84+ "userProperties" : {
85+ "some" : " value"
86+ },
87+ "authenticationMethod" : " auth_method" ,
88+ "authPacket" : {
89+ "some" : " value"
90+ },
91+ "resubscribe" : true
7092 }
7193}
7294```
7395
7496### Plan sample:
97+
7598Add in [ plan.json] :
99+
76100##### Simple:
101+
77102``` json
78103{
79104 "id" : " mqtt_default" ,
@@ -94,15 +119,15 @@ Add in [plan.json]:
94119 "retain" : false ,
95120 "dup" : false ,
96121 "properties" : {
97- "payloadFormatIndicator" : true ,
98- "messageExpiryInterval" : 60 ,
99- "topicAlias" : 1 ,
100- "responseTopic" : " res_topic" ,
101- "userProperties" : {
102- "some" : " value"
103- },
104- "subscriptionIdentifier" : 1234 ,
105- "contentType" : " contenttype_value"
122+ "payloadFormatIndicator" : true ,
123+ "messageExpiryInterval" : 60 ,
124+ "topicAlias" : 1 ,
125+ "responseTopic" : " res_topic" ,
126+ "userProperties" : {
127+ "some" : " value"
128+ },
129+ "subscriptionIdentifier" : 1234 ,
130+ "contentType" : " contenttype_value"
106131 }
107132 }
108133}
@@ -111,13 +136,15 @@ Add in [plan.json]:
111136More information in MQTT [ api reference] ( https://github.com/mqttjs/MQTT.js/#api )
112137
113138### Output (Process values):
114- * ` PROCESS_EXEC_ERR_OUTPUT ` : Error output message.
115139
116- [ Runnerty ] : http://www.runnerty.io
140+ - ` PROCESS_EXEC_ERR_OUTPUT ` : Error output message.
141+
142+ [ runnerty ] : http://www.runnerty.io
117143[ downloads-image ] : https://img.shields.io/npm/dm/@runnerty/executor-mqtt.svg
118144[ npm-url ] : https://www.npmjs.com/package/@runnerty/executor-mqtt
119145[ npm-image ] : https://img.shields.io/npm/v/@runnerty/executor-mqtt.svg
120146[ david-badge ] : https://david-dm.org/runnerty/executor-mqtt.svg
121147[ david-badge-url ] : https://david-dm.org/runnerty/executor-mqtt
122148[ config.json ] : http://docs.runnerty.io/config/
123149[ plan.json ] : http://docs.runnerty.io/plan/
150+ [ runnerty-cli ] : https://www.npmjs.com/package/runnerty-cli
0 commit comments