Zeebe JobWorker binding spec

Detailed documentation on the Zeebe JobWorker binding component

Component format

To setup Zeebe JobWorker binding create a component of type bindings.zeebe.jobworker. See this guide on how to create and apply a binding configuration.

See this for Zeebe JobWorker documentation.

  1. apiVersion: dapr.io/v1alpha1
  2. kind: Component
  3. metadata:
  4. name: <NAME>
  5. namespace: <NAMESPACE>
  6. spec:
  7. type: bindings.zeebe.jobworker
  8. version: v1
  9. metadata:
  10. - name: gatewayAddr
  11. value: <host>:<port>
  12. - name: gatewayKeepAlive
  13. value: 45s
  14. - name: usePlainTextConnection
  15. value: true
  16. - name: caCertificatePath
  17. value: /path/to/ca-cert
  18. - name: workerName
  19. value: products-worker
  20. - name: workerTimeout
  21. value: 5m
  22. - name: requestTimeout
  23. value: 15s
  24. - name: jobType
  25. value: fetch-products
  26. - name: maxJobsActive
  27. value: 32
  28. - name: concurrency
  29. value: 4
  30. - name: pollInterval
  31. value: 100ms
  32. - name: pollThreshold
  33. value: 0.3
  34. - name: fetchVariables
  35. value: productId, productName, productKey

Spec metadata fields

FieldRequiredBinding supportDetailsExample
gatewayAddrYInputZeebe gateway addresslocalhost:26500
gatewayKeepAliveNInputSets how often keep alive messages should be sent to the gateway. Defaults to 45 seconds45s
usePlainTextConnectionNInputWhether to use a plain text connection or nottrue,false
caCertificatePathNInputThe path to the CA cert/path/to/ca-cert
workerNameNInputThe name of the worker activating the jobs, mostly used for logging purposesproducts-worker
workerTimeoutNInputA job returned after this call will not be activated by another call until the timeout has been reached; defaults to 5 minutes5m
requestTimeoutNInputThe request will be completed when at least one job is activated or after the requestTimeout. If the requestTimeout = 0, a default timeout is used. If the requestTimeout < 0, long polling is disabled and the request is completed immediately, even when no job is activated. Defaults to 10 seconds30s
jobTypeYInputthe job type, as defined in the BPMN process (e.g. <zeebe:taskDefinition type=”fetch-products” />)fetch-products
maxJobsActiveNInputSet the maximum number of jobs which will be activated for this worker at the same time. Defaults to 3232
concurrencyNInputThe maximum number of concurrent spawned goroutines to complete jobs. Defaults to 44
pollIntervalNInputSet the maximal interval between polling for new jobs. Defaults to 100 milliseconds100ms
pollThresholdNInputSet the threshold of buffered activated jobs before polling for new jobs, i.e. threshold * maxJobsActive. Defaults to 0.30.3
fetchVariablesNInputA list of variables to fetch as the job variables; if empty, all visible variables at the time of activation for the scope of the job will be returnedproductId, productName, productKey

Binding support

This component supports input binding interfaces.

Input binding

The Zeebe workflow engine handles the workflow state as also workflow variables which can be passed on workflow instantiation or which can be updated or created during workflow execution. These variables can be passed to a registered job worker by defining the variable names as comma-separated list in the fetchVariables metadata field. The workflow engine will then pass these variables with its current values to the job worker implementation.

If the binding will register three variables productId, productName and productKey then the service will be called with the following JSON:

  1. {
  2. "productId": "some-product-id",
  3. "productName": "some-product-name",
  4. "productKey": "some-product-key"
  5. }

Last modified August 2, 2021 : Fix Java SDK link (#1695) (2c67fd1)