MQTT event publisher is used to send events to a MQTT broker based on the configurations you provide. You can configure it with XML, JSON, and text output mapping types.
...
For instructions on creating a MQTT event publisher, see Publishing Events . .
Configuring global properties
The following global properties can be set for the MQTT event publisher type in the <CEP_HOME>/repository/conf/input-event-adapters.xml
file. These properties apply to all the publishers of the mqtt
type. If a global property available by default is removed, the default value of the property is considered.
Property Key | Description | Data Type | Default Value |
---|---|---|---|
minThread | The minimum number of threads (including idle threads) that should be available in the thread pool at a given time. | Integer | 8 |
maxThread | The maximum number of threads (including idle threads) that should be available in the thread pool at a given time. | Integer | 100 |
keepAliveTimeInMillis | The maximum number of milliseconds that idle threads should be kept alive when the total number of threads in the pool exceeds the number of cores in the machine. | Integer | 20000 |
jobQueueSize | The maximum number of milliseconds that idle threads should be kept alive when the total number of threads in the pool exceeds the number of cores in the machine. | Integer | 10000 |
connectionKeepAliveInterval | The time interval in milliseconds at which a check should be carried out to identify inactive threads. | Integer | 60 |
Configuring adapter properties
...
Adapter Property | Description | Configuration file property | Example |
---|---|---|---|
Client Id | Client identifier is used by the server to identify a client when it reconnects, It used for durable subscriptions or reliable delivery of messages is required | clientId | test-client |
Broker Url | MQTT broker URL. The same URL can be used f or WSO2 MB when offset=0 | url | tcp://localhost:1883 |
Username | Username of the broker | username | mqtt-user |
Password | Password of the broker | password | mqtt-password |
Clean Session | Whether to persist topic subscriptions and acknowledge positions across client sessions | cleanSession | true/false |
Quality of Service | Quality of service for delivering messages between clients and servers. There are three QoS levels in MQTT are as follows.
| qos | 0,1,2 |
...
Adapter Property | Description | Configuration file property | Example |
---|---|---|---|
Topic | The topic that will be used to send messages to MQTT broker. | topic | sensordata |