Advance Properties Configuration for the MQTT Channel
You can configure CDD properties for reconnections, timeout values, and keepalive intervals.
Property | Description |
---|---|
be.mqtt.connect.attempts |
Specifies the number of reconnection attempts, and the interval between each attempt to connect to the MQTT broker. The value must use the format,
attempts,retry interval .
For example, to specify 10 attempts, with a 500 millisecond interval between each retry attempt, the property will have the value
If the value of
Default value of retry interval: 500 Default value of number of attempts: unlimited Note: In default conditions, the initial interval will be of 1 second. For every failed connection, the delay will double and once it reaches 2 minutes, it will remain constant.
|
be.mqtt.connection.timeout |
Used to set the connection timeout value in seconds. Connection timeout defines the maximum time interval for which the client waits to establish a network connection with the MQTT server. Default: 30 second A timeout value of 0 disables timeout processing. The client waits till the network connection is made successfully or fails. |
be.mqtt.connect.keep.alive.interval |
Sets the keepalive interval in seconds. The keep alive interval defines the maximum time interval between messages sent or received. It enables the client to detect if the server is no longer available, withoutwaiting for the TCP/IP timeout. The client ensures that at least one message travels across the network within each keep alive period. In absence of a data-related message during the time period, the client sends a ping message that the server acknowledges. A value of 0 disables keepalive processing in the client. Default: 60 seconds. |
Working with Duplicate and Retained Messages
You can receive duplicate and retained message flags from MQTT messages. You can get these values by defining boolean properties
mqttDuplicateMessage
and
mqttRetainedMessage
in user event.