MQTT Listener
In the eiConsole or eiPlatform, the MQTT Listener is for MQ messages using the MQTT protocol. This Listener (Adapter) has 8 configuration tabs: Basic, Advanced, Transaction Logging, Inactivity, Connection, Persistance, Security and Last Will and Testament.
Listener (Adapter) Configuration Drop-Down List
Basic MQTT Listener Configuration Options
On the Basic tab configuration you can specify:
- MQTT Version – version of MQTT to use (v.3.1.1 or v.3.1)
- Polling interval – how to often the Listener checks the status of the broker connection (in seconds, minutes, hours, days or weeks). If the value is set with enhanced properties, the units are in seconds
MQTT Listener Basic Configuration Options
Advanced MQTT Listener Configuration Options
The Advanced tab allows you to specify whether or not you should only run the Listener when it is triggered externally, and how many elements should be serialized.
Also, you can set:
- Allow Command-Line Invocation – if enabled, the Listener can be invoked using the CLI client application
- Restart on Listening Error – if enabled, the Listener will be restarted after an error occurs
- FIFO Queue Name – the FIFO options enable a “First In, First Out” queuing mechanism between Listeners and Transports. If a FIFO Queue Name is provided, it will be used as a key for a transaction queue. Transactions will be written to this queue before they reach a Transport. The transactions in this queue will be ordered according to when they were created by the Listener.
- FIFO Queue Delay – this is the interval between updates or checks against that queue. Providing a queue name guarantees that a given Transport sends transactions in the same order that the Listener created them in.
MQTT Listener Advanced Configuration Options
Transaction Logging MQTT Listener Configuration Options
The Transaction Logging tab allows you to specify:
- Transaction Logging Enabled – if enabled, allows transaction events originating from this Listener to be logged by a TransactionEventListener
- Log Transaction Data – if enabled, logs transaction data body
- Log Transaction Data Base64 – if enabled, logs transaction data body as Base64
- Log Transaction Attributes – if enabled, logs transaction attributes
- Log All Attributes – if enabled, no attributes will be filtered
- Allowed Attributes – attributes that are allowed to be logged
MQTT Listener Transaction Logging Configuration Options
Inactivity MQTT Listener Configuration Options
The Inactivity tab allows you to specify:
- Enable Inactivity Monitor – check this box to enable inactivity monitoring. This will throw a non-transaction exception if the specified number of transactions haven’t been processed in the specified time interval.
- Min. Transactions to Expect – the number of transactions to expect to be completed per monitoring interval
- Monitoring Interval – how often to check the specified number of transactions that have been processed
- Times to Monitor – if set, monitoring will be done during the defined times of the day. To ignore, set start and end time equally.
- Days to Exclude from Monitoring – inactivity monitoring will not occur on the days specified
- Include Errors in Transaction Count – if checked, transactions that attempted to start, but failed at the Listener stage, will also be counted
MQTT Listener Inactivity Configuration Options
Throttling MQTT Listener Configuration Options
The Throttling tab allows you to specify:
- Throttling Mode – the throttling mode to use for limiting the number of transactions or messages emitted by this Listener. “Timed” will limit transactions based on time intervals, while “Concurrent” will limit based on a concurrent number of transactions. “Concurrent” mode requires a Throttling Response Processor step later in your interface workflow to acknowledge completion.
MQTT Listener Throttling Mode
- Throttling Mechanism – the mechanism to use for throttling messages. “Blocking” prevents the Listener from continuing to process and emit messages altogether, while “queued” pushes received messages into the interface queue or a default, in-memory queue.
- Max Concurrent Messages – how many messages can be concurrently processed, either by time-based limits (allow X per second) or synchronous (allow X at any time)
- Timed Emission Interval – the interval for time-based limits (allow X per X timed emission interval)
- Synchronous Timeout Interval – the interval to wait for a synchronous response before failing
MQTT Listener Throttling Configuration Options
Connection MQTT Listener Configuration Options
On the Connection tab you can specify:
- MQTT Broker – MQTT broker to subscribe to
- Topic(s) – topics to interact with
- Client ID – unique Identifier for the client on the MQTT broker
- Connection Timeout Interval – time to wait for the client to connect to the broker. If the value is set with enhanced properties, the units are seconds.
MQTT Listener Connection Configuration Options (top half of screen)
- Enable Keep Alive – when enabled, this allows the Listener to detect if a broker is unavailable without waiting on TCP/IP timeout
- Keep Alive Interval – the max time between received messages
- Max Inflight Messages – limit to the number of messages
- Topic Received Attribute – attribute which topic a message was received from
MQTT Listener Connection Configuration Options (bottom half of screen)
Persistence MQTT Listener Configuration Options
On the Persistence tab you can specify:
- Is Clean Session – creates a clean session, this ignores persistence
- Persistence Type – method of persistence (Memory Persistence/File Persistence)
- File Persistence Location – location of file persistence
MQTT Listener Persistence Configuration Options
Security MQTT Listener Configuration Options
On the Security tab, you can specify:
- Username – username for connection to the broker
- Password – password for connection to the broker
- Use SSL – enables SSL for the MQTT connection
- KeyStore Type – the type of KeyStore to load
- KeyStore Algorithm – the type of KeyStore algorithm to use
- KeyStore File – location of KeyStore file to use
- KeyStore Password – password for KeyStore
- TrustStore Type – the type of TrustStore to load
MQTT Listener Security Configuration Options (top half of screen)
- TrustStore Algorithm – the type of TrustStore algorithm to use
- TrustStore File – location of TrustStore file to use
- TrustStore Password – password for TrustStore
MQTT Listener Security Configuration Options (bottom half of screen)
Last Will and Testament MQTT Listener Configuration Options
On the Last Will and Testament tab you can specify:
- Enable Last Will and Testament – enables Last Will and Testament settings
- LWT Topic Name – topic to send Last Will and Testament message to
- LWT Message – Last Will and Testament message
- LWT QoS – Quality of Service method for Last Will and Testament message
- Retain LWT Message – whether or not a Last Will and Testament message should be retained
MQTT Listener Last Will and Testament Configuration Options