tibrvcmTransport_SetWorkerTasks()

Function

Declaration

tibrv_status tibrvcmTransport_SetWorkerTasks(
    tibrvcmTransport     cmTransport,
    tibrv_u32            workerTasks);

Purpose

Set the worker task capacity of a distributed queue transport.

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

cmTransport

Set the task capacity of this distributed queue transport.

workerTasks

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

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

See Also

Distributed Queue, in TIBCO Rendezvous Concepts

tibrvcmTransport_CreateDistributedQueue()

tibrvcmTransport_GetWorkerTasks()