Striim 3.9.6 documentation

MQTTReader

Reads messages from an MQTT broker.

See Supported reader-parser combinations) for parsing options.

property

type

default value

notes

brokerUri

java.lang.String

format is tcp://<broker address>:<broker port>

clientId

java.lang.String

MQTT client ID (maximum 23 characters). Must be unique (not used by any other client) in order to identify this instance of MQTTReader. The MQTT broker will use this ID close the connection when MQTTReader goes offline and resend events when it restarts.

QoS

java.lang.Integer

0

0: at most once

1: at least once

2: exactly once

Topic

java.lang.String

The output type is WAevent except when using AvroParser  or JSONParser.

Sample:

CREATE SOURCE tempsensor 
USING MQTTReader (
  brokerUri:'tcp://m2m.eclipse.org:1883',
  Topic:'/striim/room687/temperature',
  QoS:0,
  clientId:'Striim'
)
PARSE USING JSONParser ( eventType:'') 
OUTPUT TO tempstream;