ActivateExponentialBackoff

ActivateExponentialBackoff 1:

A feature referred to as "exponential backoff" can be used to avoid burdening the message broker with unnecessary connection requests in case of a connection error. In the event of a TLS connection error involving the message broker, the reconnect rate is adjusted multiplicatively. This function can be activated using the ActivateExponentialBackoff() method. The parameters of the method specify the minimum and maximum time for the algorithm. The minimum time describes the initial delay value for the new connection attempt. The maximum time describes the highest delay value. The delay values are doubled until the maximum value is reached. Once a connection has been established, the backoff rate is reset to the original value. The DeactivateExponentialBackoff() method can be used to deactivate this function programmatically.

Syntax

METHOD ActivateExponentialBackoff
VAR_INPUT
    tMqttBackoffMinTime: TIME;
    tMqttBackoffMaxTime: TIME;
END_VAR

ActivateExponentialBackoff 2: Inputs

Name

Type

Description

tMqttBackoffMinTime

TIME

Describes the initial delay value for the new connection attempt.

tMqttBackoffMaxTime

TIME

Describes the largest delay value. Once this value has been reached, all new connection attempts are made at these intervals.