Skip to main content

MQTT Reader

Reads messages from an MQTT broker.

See the MQTT FAQ for information on firewall settings.

See Supported reader-parser combinations) for parsing options.

MQTT Reader properties

property

type

default value

notes

Broker URI

String

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

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 MQTTReader. The MQTT broker will use this ID close the connection when MQTTReader goes offline and resend events when it restarts.

Keystore

String

Location of the Java keystore file containing the Striim application’s own certificate and private key. If this is blank and a value is specified for Keystore Type, an empty keystore is created. If Keystore Type is blank, leave blank

Keystore Password

encrypted password

Provide a password if required to unlock the keystore or to check the integrity of the keystore data. Otherwise, leave blank. See Encrypted passwords.

Keystore Type

String

Set to DKS, JKS, JCEKS, PKCS11, or PKCS12 to enable SSL. Otherwise, leave blank.

Password

encrypted password

The password for Username, if specified. See Encrypted passwords.

QoS

Integer

0

0: at most once

1: at least once

2: exactly once

Topic

String

Username

String

If the MQTT broker is using application-level authentication, provide a username. Otherwise leave blank.

The output type is WAevent except when using Avro Parser  or JSONParser.

MQTT Reader example

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;