Designer 10.7 | webMethods Service Development Help | Working with MQTT Triggers | Configuring Message Processing for an MQTT Trigger
 
Configuring Message Processing for an MQTT Trigger
Message processing for an MQTT trigger determines:
*The number of MQTT messages received from the MQTT server that can be in the trigger’s local queue awaiting processing.
*The number of threads Integration Server can use at one time to process messages received by the MQTT trigger.
When an MQTT trigger receives a message from the MQTT server, the trigger places the message in a local trigger queue which is an internal memory-based queue on the Integration Server. The message remains in the local trigger queue until it is pulled from the queue for processing. The MQTT trigger processes messages in the same order in which the trigger retrieved the messages. When the local trigger queue is at capacity, the MQTT trigger cannot receive any new messages from the MQTT server. The MQTT trigger must process one or more messages in the queue before more messages can be retrieved.
The local trigger queue acts as a buffer between the receipt of the message and processing the message. One server thread handles message retrieval while a separate server thread handles message processing. When configuring message processing the intent is to size the queue and set concurrent execution threads such that there is a steady retrieval and processing of messages. The queue capacity and execution thread values need to minimize the resources that the local trigger queue and service execution consume, such as memory, as well as limit the situations where new messages cannot be received because the local trigger queue is full.
Note:
Unlike JMS triggers and webMethods messaging trigger which can process messages serially or concurrently, an MQTT trigger processes messages concurrently only. MQTT 3.1.1 does not support shared clients making it impossible to process message from the same publisher in order or to have MQTT triggers on a cluster of Integration Servers process messages in a load balanced fashion. As a result, serial processing is not necessary. If you want the MQTT trigger to process messages one at a time, set the Max execution threads to 1.
*To configure message processing for an MQTT trigger
1. In the Package Navigator view of Designer, open the MQTT trigger for which you want to set message processing.
2. In the Properties view, under General, in the Max execution threads property specify the maximum number of messages that Integration Server can process for the trigger at concurrently. Integration Server uses one server thread to process each message. The default is 1 thread.
3. In the Queue Capacity property, specify the maximum number of messages that can be in the local queue for the MQTT trigger. The minimum value is 1. The default is 10 messages.
4. Click File > Save.