Connection management

ONE ERP Link maintains a permanent connection to ActiveMQ Broker. At startup the system tries to connect synchronously, if the connection fails then the monitoring thread is started.

Configuration

Connection is configured automatically by the ONE ERP deployment system. For details about manual configuration read the Package: link page.

The monitoring thread

The monitoring thread tries to reconnect to the ActiveMQ Broker after a dynamic delay. The retry delay is between 5 and 60 seconds and is calculated using the following formula:

MIN(5 * FLOOR((RETRY_COUNT + 10) / 10), 60)

The monitoring thread is started in one of the following situations:

  1. When the ONE ERP instance is started, if the first attempt to connect fails
  2. At run-time when a previously started connection fails

The monitoring thread runs until one of the following conditions is met:

  1. The connection is successfully established
  2. The connection fails due to invalid credentials
  3. Retry count reaches MAX_RETRIES (2^31-1)