ZWorkerOptions

zio.temporal.worker.ZWorkerOptions
See theZWorkerOptions companion object
final case class ZWorkerOptions

Represents worker options

Attributes

See also

WorkerOptions

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def toJava: WorkerOptions

Converts worker options to Java SDK's WorkerOptions

Converts worker options to Java SDK's WorkerOptions

Attributes

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
def transformJavaOptions(f: Builder => Builder): ZWorkerOptions

Allows to specify options directly on the java SDK's WorkerOptions. Use it in case an appropriate withXXX method is missing

Allows to specify options directly on the java SDK's WorkerOptions. Use it in case an appropriate withXXX method is missing

Attributes

Note

the options specified via this method take precedence over those specified via other methods.

def withBuildId(value: String): ZWorkerOptions

Set a unique identifier for this worker. The identifier should be stable with respect to the code the worker uses for workflows, activities, and interceptors.

Set a unique identifier for this worker. The identifier should be stable with respect to the code the worker uses for workflows, activities, and interceptors.

Attributes

Value parameters

value

time period in ms that will be used to detect workflows deadlock. Default is 1000ms, which is chosen if set to zero. Specifies an amount of time in milliseconds that workflow tasks are allowed to execute without interruption. If workflow task runs longer than specified interval without yielding (like calling an Activity), it will fail automatically.

Attributes

See also

io.temporal.internal.sync.PotentialDeadlockException

Value parameters

value

the default amount of time between sending each pending heartbeat to the server. This is used if the ActivityOptions do not provide a HeartbeatTimeout. Otherwise, the interval becomes a value a bit smaller than the given HeartbeatTimeout. Default is 30s, which is chosen if set to null or 0.

Attributes

Disable eager activities. If set to true, eager execution will not be requested for activities requested from workflows bound to this Worker.

Disable eager activities. If set to true, eager execution will not be requested for activities requested from workflows bound to this Worker.

Eager activity execution means the server returns requested eager activities directly from the workflow task back to this worker which is faster than non-eager which may be dispatched to a separate worker.

Defaults to false, meaning that eager activity execution is permitted

Attributes

If set to true worker would only handle workflow tasks and local activities. Non-local activities will not be executed by this worker.

If set to true worker would only handle workflow tasks and local activities. Non-local activities will not be executed by this worker.

Default is false.

Attributes

Value parameters

value

Maximum number of activities executed in parallel. Default is 200, which is chosen if set to zero.

Attributes

Number of simultaneous poll requests on activity task queue. Consider incrementing if the worker is not throttled due to MaxActivitiesPerSecond or MaxConcurrentActivityExecutionSize options and still cannot keep up with the request rate.

Number of simultaneous poll requests on activity task queue. Consider incrementing if the worker is not throttled due to MaxActivitiesPerSecond or MaxConcurrentActivityExecutionSize options and still cannot keep up with the request rate.

Default is 5, which is chosen if set to zero.

Attributes

Value parameters

value

Maximum number of local activities executed in parallel. Default is 200, which is chosen if set to zero.

Attributes

Value parameters

value

Maximum number of simultaneously executed workflow tasks. Default is 200, which is chosen if set to zero. Note that this is not related to the total number of open workflows which do not need to be loaded in a worker when they are not making state transitions.

Attributes

Sets the maximum number of simultaneous long poll requests to the Temporal Server to retrieve workflow tasks. Changing this value will affect the rate at which the worker is able to consume tasks from a task queue.

Sets the maximum number of simultaneous long poll requests to the Temporal Server to retrieve workflow tasks. Changing this value will affect the rate at which the worker is able to consume tasks from a task queue.

Due to internal logic where pollers alternate between sticky and non-sticky queues, this value cannot be 1 and will be adjusted to 2 if set to that value.

Default is 5, which is chosen if set to zero.

Attributes

Value parameters

value

the maximum amount of time between sending each pending heartbeat to the server. Regardless of heartbeat timeout, no pending heartbeat will wait longer than this amount of time to send. Default is 60s, which is chosen if set to null or 0.

Attributes

Optional: Sets the rate limiting on number of activities that can be executed per second. This is managed by the server and controls activities per second for the entire task queue across all the workers. Notice that the number is represented in double, so that you can set it to less than 1 if needed. For example, set the number to 0.1 means you want your activity to be executed once every 10 seconds. This can be used to protect down stream services from flooding. The zero value of this uses the default value. Default is unlimited.

Optional: Sets the rate limiting on number of activities that can be executed per second. This is managed by the server and controls activities per second for the entire task queue across all the workers. Notice that the number is represented in double, so that you can set it to less than 1 if needed. For example, set the number to 0.1 means you want your activity to be executed once every 10 seconds. This can be used to protect down stream services from flooding. The zero value of this uses the default value. Default is unlimited.

Attributes

Value parameters

value

Maximum number of activities started per second by this worker. Default is 0 which means unlimited. Note that this is a per worker limit. Use withMaxTaskQueueActivitiesPerSecond to set per task queue limit across multiple workers.

Attributes

Timeout for a workflow task routed to the "sticky worker" - host that has the workflow instance cached in memory. Once it times out, then it can be picked up by any worker.

Timeout for a workflow task routed to the "sticky worker" - host that has the workflow instance cached in memory. Once it times out, then it can be picked up by any worker.

Default value is 5 seconds.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product