-
Optional Element Summary
Optional Elements
boolean
If set to true, the job is automatically completed after the worker code has finished.
boolean
boolean
If set to true, all variables are fetched
Set a list of variable names which should be fetch on job activation.
int
Set the maximum number of jobs which will be exclusively activated for this worker at the same time.
long
Set the maximal interval (in milliseconds) between polling for new jobs.
long
Set the request timeout (in seconds) for activate job request used to poll for new job.
long
Set the time (in milliseconds) for how long a job is exclusively assigned for this worker.
-
Element Details
-
-
-
timeout
long timeout
Set the time (in milliseconds) for how long a job is exclusively assigned for this worker.
In this time, the job can not be assigned by other workers to ensure that only one worker work on the job.
When the time is over then the job can be assigned again by this or other worker if it's not completed yet.
If no timeout is set, then the default is used from the configuration.
- Default:
-1L
-
maxJobsActive
int maxJobsActive
Set the maximum number of jobs which will be exclusively activated for this worker at the same time.
This is used to control the backpressure of the worker. When the maximum is reached then the worker will stop activating new jobs
in order to not overwhelm the client and give other workers the chance to work on the jobs.
The worker will try to activate new jobs again when jobs are completed (or marked as failed).
If no maximum is set then the default, from the ZeebeClientConfiguration, is used.
Considerations:
A greater value can avoid situations in which the client waits idle for the broker to provide more jobs. This can improve the worker's throughput.
The memory used by the worker is linear with respect to this value.
The job's timeout starts to run down as soon as the broker pushes the job.
Keep in mind that the following must hold to ensure fluent job handling:
time spent in queue + time job handler needs until job completion invalid input: '<' job timeout
- Default:
-1
-
requestTimeout
long requestTimeout
Set the request timeout (in seconds) for activate job request used to poll for new job.
If no request timeout is set then the default is used from the
invalid reference
ZeebeClientConfiguration
- Default:
-1L
-
pollInterval
long pollInterval
Set the maximal interval (in milliseconds) between polling for new jobs.
A job worker will automatically try to always activate new jobs after completing jobs.
If no jobs can be activated after completing the worker will periodically poll for new jobs.
If no poll interval is set then the default is used from the
invalid reference
ZeebeClientConfiguration
- Default:
-1L
-
fetchVariables
Set a list of variable names which should be fetch on job activation.
The jobs which are activated by this worker will only contain variables from this list.
This can be used to limit the number of variables of the activated jobs.
- Default:
{}
-
fetchAllVariables
boolean fetchAllVariables
If set to true, all variables are fetched
- Default:
false
-
autoComplete
boolean autoComplete
If set to true, the job is automatically completed after the worker code has finished.
In this case, your worker code is not allowed to complete the job itself.
You can still throw exceptions if you want to raise a problem instead of job completion.
You could also raise a BPMN problem throwing a
invalid reference
io.camunda.zeebe.spring.client.exception.ZeebeBpmnError
- Default:
true
-
enabled
boolean enabled
- Default:
true