Updating the work queue configuration

PolicyCenter instantiates custom work queues that derive from WorkQueueBase or BulkInsertWorkQueueBase at start up, for servers in a PolicyCenter cluster with the workqueue server role. For PolicyCenter to instantiate your custom work queue, you must add a work-queue element for it in the workqueue-config.xml file.

The work-queue element in workqueue-config.xml has the following syntax.

<work-queue workQueueClass="string" progressinterval="decimal">
  <worker instances="1" />
</work-queue> 

The work-queue element

The work-queue element identifies your custom work queue to PolicyCenter. For the workQueueClass attribute, specify the fully qualified class name of your custom work queue Gosu class.

The value of the progressinterval attribute is measured in milliseconds, and there is no default. It specifies the interval of time that PolicyCenter waits for a worker task to complete an allotment, or batch, of work items checked out to it from the work queue. If a worker does not complete an allotment within the time specified, the remaining work items become orphaned, and PolicyCenter assigns them to another worker task to complete.

An interval that is too short can result in many orphaned work items, which can create processing overhead by frequently reassigning work items. The default allotment, or batch size, is 10 work items. Start with a value of 600000 for progressinterval. If you see many orphaned work items, increase the value. A value that exceeds the actual interval required causes no processing delays.

The worker element

The XML schema requires a worker element for your custom work queue to operate. The instances attribute sets the number of work tasks to create initially for the work queue at server startup. Generally a value of 1 is sufficient.

See also