Understanding the retry mechanism on external worker when process Engine is not reachable

Hi,
We are developing a java external worker and we are studying the error scenarios that may occur in relation to connection issues between the worker and process engine. During our investigation and testing, we noticed that when Camunda process engine is not reachable the worker raises the below exception:

ERROR org.camunda.bpm.client - TASK/CLIENT-03001 Exception while fetch and lock task.

Then it keeps retrying with a time lapse between each retry. The time lapse is increasing from retry to other then it is fixed to one minute.
Searching on Camunda documentation, we couldn’t find anything that describe this retry mechanism and if the retry will be forever or not.

So our question is, Is there any concrete description of the retry process ? and is there any provided java methods by Camunda that can control this mechanism (example set a maximum retry)?

I’d look into the source code. This has already served me well a couple of times.