@camunda8/orchestration-cluster-api
    Preparing search index...

    Interface ThreadedJobWorkerConfig<In, Out, Headers>

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

    interface ThreadedJobWorkerConfig<
        In extends z.ZodTypeAny = any,
        Out extends z.ZodTypeAny = any,
        Headers extends z.ZodTypeAny = any,
    > {
        autoStart?: boolean;
        customHeadersSchema?: Headers;
        fetchVariables?: In extends ZodType<
            unknown,
            unknown,
            $ZodTypeInternals<unknown, unknown>,
        >
            ? Extract<keyof output<In<In>>, string>[]
            : string[];
        handlerModule: string;
        inputSchema?: In;
        jobTimeoutMs?: number;
        jobType: string;
        maxParallelJobs?: number;
        outputSchema?: Out;
        pollIntervalMs?: number;
        pollTimeoutMs?: number;
        startupJitterMaxSeconds?: number;
        threadPoolSize?: number;
        validateSchemas?: boolean;
        workerName?: string;
    }

    Type Parameters

    • In extends z.ZodTypeAny = any
    • Out extends z.ZodTypeAny = any
    • Headers extends z.ZodTypeAny = any
    Index

    Properties

    autoStart?: boolean

    Immediately start polling for work - default true

    customHeadersSchema?: Headers

    Zod schema for custom headers in the activated job

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

    Optional list of variable names to fetch during activation

    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?: In

    Zod schema for variables in the activated job

    jobTimeoutMs?: number

    Job activation timeout

    jobType: string

    Zeebe job type

    maxParallelJobs?: number

    concurrency limit

    outputSchema?: Out

    Zod schema for variables in the complete command

    pollIntervalMs?: number

    Backoff between polls - default 1ms

    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?: 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?: 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?: boolean

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

    workerName?: string

    Optional explicit name