MQTT Writer
Writes messages to an MQTT broker.
See the MQTT FAQ for information on firewall settings.
MQTT Writer properties
property | type | default value | notes |
---|---|---|---|
Broker URI | String | format is | |
Client ID | String | MQTT client ID (maximum 23 characters). Must be unique (not used by any other client) in order to identify this instance of MQTTWriter. The MQTT broker will use this ID close the connection when MQTTWriter goes offline and resend events after it restarts. | |
QoS | Integer | 0 |
|
Topic | String |
This adapter has a choice of formatters. See Supported writer-formatter combinations for more information.
MQTT Writer sample application
CREATE CQ ConvertTemperatureToControl INSERT INTO controlstream SELECT TO_STRING(data.get('roomName') ), TO_STRING(data.get('temperature')) FROM tempstream; CREATE TARGET accontrol USING MQTTWriter( brokerUri:'tcp://m2m.eclipse.org:1883', Topic:'/striim/room687/accontrol', QoS:0, clientId:"StriimMqttSource" ) FORMAT USING JSONFormatter ( members:'roomName,targetTemperature' ) INPUT FROM controlstream;