Workload segregation for task queue agents

Generally, the jobs that are placed first in the task queue are processed first. Every job in the task queue for one transaction has different workload. Some jobs have more workload than the other jobs. For example, the workload to schedule an order with 3000 lines is enormous in comparison to the order with 10 lines. If both types of orders are processed in a single agent instance, orders with large number of lines can lower the overall throughput and also can impact normal order throughput because these orders are processed only after a large order is processed. Similarly, every job for a transaction does not require same quantum of resources like memory, CPU, and IO to process, might not undergo same process flow such as pipeline, order or line validations, and might not be configured to start same components such as event handlers and user exits. It is better if such jobs with different workload and different business flows are processed in separate JVMs so that you can prioritize one or more such groups among others and individually scale up the processing powers.

IBM® Sterling Order Management System Software provides a capability to segregate workload of task queue agents and create jobs with different segregation patterns. You can put these segregation patterns as a filter in the agent criteria of task queue agents to process the matching jobs. As the segregation of workload is accessible with agent criteria, it provides flexibility to prioritize and run a specific type of workload with required capacity to scale up the agent processing for individual workload.

Task queue agents get jobs from the YFS_Task_Q table that is based on the agent transaction and agent input criteria specifications. A task queue agent looks for jobs for a particular transaction and datatype. For example, the agents that are defined for SCHEDULE.0001 transaction always search for SCHEDULE.0001 and OrderHeaderKey as transaction_key and data_type. You can specify more filters to retrieve the jobs as agent criteria parameters. The Task Queue Filter Criteria parameter is available in the agent criteria for all task queue agents. The YFS_Task_Q table contains a filter_criteria column and the values set for Task Queue Filter Criteria parameter are matched against the filter_criteria in the YFS_Task_Q table along with transaction_key and data_type. The filter_criteria is set when a job is created in the YFS_Task_Q table and can remain same for the life of the job. But if you need to reevaluate the filter_criteria for an existing job for certain transactions during fulfillment process, configurations are provided in Sterling Order Management System Software. The filter_criteria is assigned with the segregation pattern that is derived for individual data on evaluating the segregation policy configured for the data type in Sterling Order Management System Software.

The configurations to enable workload segregation, various segregation policy configurations, data types that are supported for workload segregation, and the transactions that support this segregation are explained in this documentation.

In addition to specifying the Task Queue Filter Criteria parameter, a segregated run for task queue agents is also achieved either by a Java system property or as an argument on starting the agent server with which the task queue agents are registered.

Configurations to enable workload segregation feature

You can use the following properties to enable or disable the workload segregation feature for task queue agents.
yfs property name Valid values Default value
yfs.taskq.filter.criteria.create.enable

true

false

true
yfs.taskq.filter.criteria.update.enable

true

false

false

The default configuration in IBM Sterling Order Management System Software derives value for the filter_criteria column of the YFS_Task_Q table, which is based on the segregation policy and the current state of the job entity when a job is created. This value is not updated when subsequent transactions modify that job. However, in Sterling Order Management System Software, certain business transactions delete the current job and create a job for sub sequent transactions instead of modifying the current job. In this scenario, the filter_criteria column is derived for the new job by re-evaluating the segregation policy for the current state of the job entity and hence its value might be different from the previous value.

IBM recommends that you assess your business flows and the corresponding modifications to the jobs. If re-evaluation is more suitable for the filter_criteria column being use, you can set the property yfs.taskq.filter.criteria.update.enable=true. When this property is set to true, the filter_criteria value is derived every time when a job is created or updated. If you set both the properties to false, Sterling Order Management System Software does not derive the filter_criteria and hence this action disables the workload segregation feature for task queue agents.

These properties only decide whether to derive the segregation pattern and assign as filter_criteria.