OptionalbuildA string that should be unique to the exact worker code/binary being executed.
OptionalbundlerOptions for the Webpack bundler when using workflowsPath.
OptionaldataProvide a custom DataConverter.
OptionaldebugEnable debug mode.
OptionaldefaultDefault heartbeat throttle interval.
OptionalenableEnable logging in replay.
OptionalenableWhether or not to poll on the Activity task queue.
OptionalenableEnable opentelemetry.
OptionalenableEnable SDK metrics.
OptionalidentityA human-readable string that can identify your worker.
OptionalinterceptorsActivity interceptors.
OptionalmaxLimits the number of Activities per second that this Worker will process.
OptionalmaxMaximum number of cached workflows.
OptionalmaxMaximum number of Activity tasks to execute concurrently. Mutually exclusive with tuner.
OptionalmaxMaximum number of concurrent Activity task polls.
OptionalmaxMaximum number of Local Activity tasks to execute concurrently. Mutually exclusive with tuner.
OptionalmaxMaximum number of Workflow Tasks to execute concurrently. Mutually exclusive with tuner.
OptionalmaxMaximum number of concurrent Workflow task polls.
OptionalmaxMaximum heartbeat throttle interval.
OptionalmaxSets the maximum number of activities per second the task queue will dispatch (server-side).
OptionalnonRatio of non-sticky to sticky workflow task polls.
OptionalreuseWhether to reuse V8 context between workflow executions.
OptionalshowShow stack trace sources in error messages.
OptionalshutdownTime to wait before giving up on graceful shutdown and forcefully terminating the worker.
OptionalshutdownTime to wait for pending tasks to drain after shutdown was requested.
OptionalsinksCustom sink function for workflow logs and metrics.
OptionalstickyTimeout for sticky queue schedule to start.
Optional ExperimentaltunerProvide a custom WorkerTuner. Mutually exclusive with maxConcurrentWorkflowTaskExecutions, maxConcurrentActivityTaskExecutions, and maxConcurrentLocalActivityExecutions.
OptionaluseIf set true, this worker opts into the worker versioning feature.
Optional ExperimentalworkerDeployment options for the worker.
OptionalworkflowNumber of threads for workflow execution.
Advanced configuration options for Temporal Worker creation. Controls worker behavior, concurrency, and performance settings. This interface includes all options from Temporal SDK's WorkerOptions except for connection, taskQueue, activities, workflowsPath, and workflowBundle which are managed by the framework.
For complete documentation of each option, see: https://typescript.temporal.io/api/interfaces/worker.WorkerOptions
Example: Production Configuration