Zeebe C# Client 2.7.0
C# Client to communicate with an Zeebe Gateway
|
Public Member Functions | |
IJobWorkerBuilderStep3 | Timeout (TimeSpan timeout) |
Set the time for how long a job is exclusively assigned for this worker. | |
IJobWorkerBuilderStep3 | Name (string workerName) |
Set the name of the worker owner. | |
IJobWorkerBuilderStep3 | MaxJobsActive (int maxJobsActive) |
Set the maximum number of jobs which will be exclusively activated for this worker at the same time. | |
IJobWorkerBuilderStep3 | FetchVariables (IList< string > fetchVariables) |
Set a list of variable names which should be fetch on job activation. | |
IJobWorkerBuilderStep3 | FetchVariables (params string[] fetchVariables) |
Set a list of variable names which should be fetch on job activation. | |
IJobWorkerBuilderStep3 | PollInterval (TimeSpan pollInterval) |
Set the maximal interval between polling for new jobs. | |
IJobWorkerBuilderStep3 | PollingTimeout (TimeSpan pollingTimeout) |
Set the polling timeout for the job activation. | |
IJobWorkerBuilderStep3 | AutoCompletion () |
Enables job worker auto completion. | |
IJobWorkerBuilderStep3 | HandlerThreads (byte threadCount) |
Specifies how many handler threads are used by this job worker. | |
IJobWorker | Open () |
Open the worker and start to work on available tasks. | |
Public Member Functions inherited from Zeebe.Client.Api.Commands.ITenantIdsCommandStep< IJobWorkerBuilderStep3 > | |
T | TenantIds (IList< string > tenantIds) |
Specifies the tenants that may own any entities (e.g. process definition, process instances, etc.) resulting from this command. | |
T | TenantIds (params string[] tenantIds) |
Specifies the tenants that may own any entities (e.g. process definition, process instances, etc.) resulting from this command. | |
IJobWorkerBuilderStep3 Zeebe.Client.Api.Worker.IJobWorkerBuilderStep3.AutoCompletion | ( | ) |
Enables job worker auto completion.
This means if the user does not complete or fails the activated job by himself then the worker will do it.
IJobWorkerBuilderStep3 Zeebe.Client.Api.Worker.IJobWorkerBuilderStep3.FetchVariables | ( | IList< string > | fetchVariables | ) |
Set a list of variable names which should be fetch on job activation.
The jobs which are activated by this command will only contain variables from this list.
This can be used to limit the number of variables of the activated jobs.
fetchVariables | list of variables names to fetch on activation |
IJobWorkerBuilderStep3 Zeebe.Client.Api.Worker.IJobWorkerBuilderStep3.FetchVariables | ( | params string[] | fetchVariables | ) |
Set a list of variable names which should be fetch on job activation.
The jobs which are activated by this command will only contain variables from this list.
This can be used to limit the number of variables of the activated jobs.
fetchVariables | list of variables names to fetch on activation |
IJobWorkerBuilderStep3 Zeebe.Client.Api.Worker.IJobWorkerBuilderStep3.HandlerThreads | ( | byte | threadCount | ) |
Specifies how many handler threads are used by this job worker.
The previous defined job handler can be called by multiple threads, to execute more jobs concurrently. Per default one job handler thread is used by an job worker. This means the job handler implementation needs to be thread safe.
Note: Job polling is done by a separate thread.
threadCount | handler thread count, needs to be larger then zero |
IJobWorkerBuilderStep3 Zeebe.Client.Api.Worker.IJobWorkerBuilderStep3.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 back pressure 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).
Considerations:
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:
maxJobsActive | the maximum jobs active by this worker |
IJobWorkerBuilderStep3 Zeebe.Client.Api.Worker.IJobWorkerBuilderStep3.Name | ( | string | workerName | ) |
Set the name of the worker owner.
This name is used to identify the worker to which a job is exclusively assigned to.
workerName | the name of the worker (e.g. "payment-service") |
IJobWorker Zeebe.Client.Api.Worker.IJobWorkerBuilderStep3.Open | ( | ) |
Open the worker and start to work on available tasks.
IJobWorkerBuilderStep3 Zeebe.Client.Api.Worker.IJobWorkerBuilderStep3.PollingTimeout | ( | TimeSpan | pollingTimeout | ) |
Set the polling timeout for the job activation.
The activate jobs request will be completed when at least one job is activated or after the given requestTimeout.
pollingTimeout | the polling timeout (e.g. "TimeSpan.FromMinutes(10)") |
IJobWorkerBuilderStep3 Zeebe.Client.Api.Worker.IJobWorkerBuilderStep3.PollInterval | ( | TimeSpan | pollInterval | ) |
Set the maximal interval 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.
pollInterval | the maximal interval to check for new jobs |
IJobWorkerBuilderStep3 Zeebe.Client.Api.Worker.IJobWorkerBuilderStep3.Timeout | ( | TimeSpan | timeout | ) |
Set the time 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.
timeout | the time as time span (e.g. "TimeSpan.FromMinutes(10)") |