4.3.7. Command service
| 4.3. Services |

### 4.3.7. Command service

The command service manages the environments and the transactions in Orchestra. Each process or api method is executed by the command service.

Its definition in the environment is the following :

    <command-service>
      <orchestra-retry-interceptor delay-factor="2" delay="100" max-delay="10000" retries="10"/>
      <environment-interceptor/>
      <standard-transaction-interceptor/>
    </command-service>

The retries (optional) attribute can be used to define how many times commands will be tried before propagating the exception. This attribute is ignored for jobs (see Section 4.3.8, “Asynchronous Executions (Jobs)”).

The delay, max-delay, delay-factor (optional) attributes can be used to define the sleep time between each retry. The sleep time for the nth attempt is given by

    sleep = min($max-delay, $delay * $delay-factor * random(1, $delay-factor)n)

delay and max-delay values are in milliseconds.

4.3.6. Querier |  | 4.3.8. Asynchronous Executions (Jobs)