Automatic Retry for Starting MQTT Triggers
As part of starting or an MQTT connection alias, Integration Server also starts the enabled MQTT triggers that use the alias to retrieve messages. If an MQTT connection alias fails or becomes unavailable after being successfully started, Integration Server attempts to restart the enable MQTT triggers once the connection alias is successfully restarted. During the start or restart process for the alias, attempts to start (or restart) the MQTT triggers might fail. For example, if the MQTT trigger and/or MQTT server are not properly configured, the trigger will not start.
If an MQTT trigger does not start when an MQTT connection alias starts (or restarts), Integration Server schedules a task to retry starting the MQTT triggers and then continues with activities associated with starting the MQTT connection alias. The trigger restart task, which runs in its own thread, attempts to restart the failed MQTT triggers at a set interval. By default, the task executes every 30 seconds. The task completes after all failed triggers for the MQTT connection alias successfully start, when the MQTT connection alias is disabled, or the maximum retry attempts have been made. If the maximum retry attempts have been made and MQTT triggers still do not start, the remaining MQTT triggers likely need to be examined for configuration problems. When the configuration issues are resolved, the MQTT trigger can be restarted manually using Integration Server.
Integration Server schedules one task for each MQTT connection alias that has triggers that do not start when the alias starts up successfully. Integration Server writes server log messages as the Info, Debug, and Trace levels to indicate the progress of the triggers restart task. Because the restart task uses a separate thread from the one used to start the MQTT connection alias, attempts to restart the MQTT trigger do not impede the completion of the connection alias start up.
Integration Server provides server configuration parameters that you can use to control the interval at which the trigger restart task attempts to start the MQTT triggers and the interval the task waits between attempts.
watt.server.commonmessaging.trigger.restartTaskRetryCount. Specifies the maximum number of retry attempts the trigger restart task makes to start the MQTT triggers that fail to start when the MQTT connection alias starts up.
Integration Server makes the initial start attempt for an MQTT trigger when starting the MQTT connection alias used by the trigger. The default is 6 retry attempts.
watt.server.commonmessaging.trigger.restartTaskRetryInterval. Specifies the number of seconds that the trigger restart task waits between attempts to restart MQTT triggers that failed to start when the MQTT connection alias started. You must specify a positive integer. The default is 30 seconds.