Annotation Interface JobWorker
@Target(METHOD)
@Retention(RUNTIME)
@Documented
@Deprecated(forRemoval=true,
since="8.8")
public @interface JobWorker
Deprecated, for removal: This API element is subject to removal in a future version.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanDeprecated, for removal: This API element is subject to removal in a future version.If set to true, the job is automatically completed after the worker code has finished.booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.If set to true, all variables are fetchedString[]Deprecated, for removal: This API element is subject to removal in a future version.Set a list of variable names which should be fetch on job activation.intDeprecated, for removal: This API element is subject to removal in a future version.Set the maximum number of jobs which will be exclusively activated for this worker at the same time.intDeprecated, for removal: This API element is subject to removal in a future version.Set the max number of retries for a jobDeprecated, for removal: This API element is subject to removal in a future version.set to empty string which leads to default from CamundaClientBuilderImpl being used in ZeebeWorkerAnnotationProcessorlongDeprecated, for removal: This API element is subject to removal in a future version.Set the maximal interval (in milliseconds) between polling for new jobs.longDeprecated, for removal: This API element is subject to removal in a future version.Set the request timeout (in seconds) for activate job request used to poll for new job.booleanDeprecated, for removal: This API element is subject to removal in a future version.longDeprecated, for removal: This API element is subject to removal in a future version.Stream timeout in msString[]Deprecated, for removal: This API element is subject to removal in a future version.longDeprecated, for removal: This API element is subject to removal in a future version.Set the time (in milliseconds) for how long a job is exclusively assigned for this worker.Deprecated, for removal: This API element is subject to removal in a future version.Set to empty string which leads to method name being used (if not ${zeebe.client.worker.default-type} is configured) Implemented in ZeebeWorkerAnnotationProcessor
-
Element Details
-
type
String typeDeprecated, for removal: This API element is subject to removal in a future version.Set to empty string which leads to method name being used (if not ${zeebe.client.worker.default-type} is configured) Implemented in ZeebeWorkerAnnotationProcessor- Default:
""
-
name
String nameDeprecated, for removal: This API element is subject to removal in a future version.set to empty string which leads to default from CamundaClientBuilderImpl being used in ZeebeWorkerAnnotationProcessor- Default:
""
-
timeout
long timeoutDeprecated, for removal: This API element is subject to removal in a future version.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 maxJobsActiveDeprecated, for removal: This API element is subject to removal in a future version.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 CamundaClientConfigurationImpl, 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 requestTimeoutDeprecated, for removal: This API element is subject to removal in a future version.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 theCamundaClientConfigurationImpl- Default:
-1L
-
pollInterval
long pollIntervalDeprecated, for removal: This API element is subject to removal in a future version.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 theCamundaClientConfiguration- Default:
-1L
-
fetchVariables
String[] fetchVariablesDeprecated, for removal: This API element is subject to removal in a future version.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 fetchAllVariablesDeprecated, for removal: This API element is subject to removal in a future version.If set to true, all variables are fetched- Default:
false
-
autoComplete
boolean autoCompleteDeprecated, for removal: This API element is subject to removal in a future version.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
BpmnError- Default:
true
-
enabled
boolean enabledDeprecated, for removal: This API element is subject to removal in a future version.- Default:
true
-
tenantIds
String[] tenantIdsDeprecated, for removal: This API element is subject to removal in a future version.- Default:
{}
-
streamEnabled
boolean streamEnabledDeprecated, for removal: This API element is subject to removal in a future version.- Default:
true
-
streamTimeout
long streamTimeoutDeprecated, for removal: This API element is subject to removal in a future version.Stream timeout in ms- Default:
3600000L
-
maxRetries
int maxRetriesDeprecated, for removal: This API element is subject to removal in a future version.Set the max number of retries for a job- Default:
-1
-
JobWorker