For the complete documentation index, see llms.txt.
Skip to main content
Version: 8.9

Interface: ThreadedJobWorkerConfig<In, Out, Headers>

Configuration for a threaded job worker. Same as JobWorkerConfig but replaces jobHandler with handlerModule.

Type Parameters​

In​

In extends z.ZodTypeAny = any

Out​

Out extends z.ZodTypeAny = any

Headers​

Headers extends z.ZodTypeAny = any

Properties​

autoStart?​

optional autoStart?: boolean;

Immediately start polling for work - default true


customHeadersSchema?​

optional customHeadersSchema?: Headers;

Zod schema for custom headers in the activated job


fetchVariables?​

optional fetchVariables?: In extends ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>> ? Extract<keyof output<In>, string>[] : string[];

Optional list of variable names to fetch during activation


handlerModule​

handlerModule: string;

Absolute or relative path to a JS/TS module that exports a default handler function. The function signature must be: (job, client) => Promise<JobActionReceipt>


inputSchema?​

optional inputSchema?: In;

Zod schema for variables in the activated job


jobTimeoutMs?​

optional jobTimeoutMs?: number;

Job activation timeout


jobType​

jobType: string;

Zeebe job type


maxParallelJobs?​

optional maxParallelJobs?: number;

concurrency limit


outputSchema?​

optional outputSchema?: Out;

Zod schema for variables in the complete command


pollIntervalMs?​

optional pollIntervalMs?: number;

Backoff between polls - default 1ms


pollTimeoutMs?​

optional pollTimeoutMs?: number;

The request will be completed when at least one job is activated or after the requestTimeout. If the requestTimeout = 0, the request will be completed after a default configured timeout in the broker. To immediately complete the request when no job is activated set the requestTimeout to a negative value


startupJitterMaxSeconds?​

optional startupJitterMaxSeconds?: number;

Maximum random delay (in seconds) before the worker starts polling. When multiple application instances restart simultaneously, this spreads out initial activation requests to avoid saturating the server. 0 (the default) means no delay.


threadPoolSize?​

optional threadPoolSize?: number;

Number of threads in the shared pool (used only when the pool is first created; subsequent workers share the existing pool). Default: number of CPU cores available to the process.


validateSchemas?​

optional validateSchemas?: boolean;

Validate any provided input, output, customheader schema default: false


workerName?​

optional workerName?: string;

Optional explicit name