TibrvCmQueueTransport.setWorkerTasks()

Method

Declaration

void setWorkerTasks(
    int   workerTasks)
  throws TibrvException

Purpose

Set the worker task capacity of a distributed queue member.

Remarks

Task capacity is the maximum number of tasks that a worker can accept. When the number of accepted tasks reaches this maximum, the worker cannot accept additional tasks until it completes one or more of them.

When the scheduler receives a task, it assigns the task to the worker with the greatest worker weight—unless the pending tasks assigned to that worker exceed its task capacity. When the preferred worker has too many tasks, the scheduler assigns the new inbound task to the worker with the next greatest worker weight.

The default worker task capacity is 1.

Zero is a special value, indicating that this distributed queue member is a dedicated scheduler (that is, it never accepts tasks).

Warning 

Tuning task capacity to compensate for communication time lag is more complicated than it might seem. Before setting this value to anything other than 1, see Task Capacity in TIBCO Rendezvous Concepts.

Parameter

Description

workerTasks

Use this task capacity. The value must be a non-negative integer.

See Also

Distributed Queue, in TIBCO Rendezvous Concepts

TibrvCmQueueTransport()

TibrvCmQueueTransport.getWorkerTasks()