Task handling is a generic feature that is already available in your Carbon products. This feature handles the tasks relevant to each server separately, within the same server. With WSO2 Task Server as a task provider, all the tasks scheduled in all your carbon servers can be executed remotely using WSO2 TS as the dedicated task server.
Task Handling Modes: There are four task handling modes available for all WSO2 Carbon servers.
- AUTO is the default task handling mode. This setting detects if clustering is enabled in the server and automatically switches to CLUSTERED task handling mode.
- STANDALONE mode is used when the Carbon server is used as a single installation. That is, tasks will be managed locally within the server.
- CLUSTERED mode is used when a cluster of Carbon servers are put together. With this setting, if one of the servers in the cluster fail, the tasks will be rescheduled in one of the remaining server nodes. This requires Axis2 clustering to work.
- REMOTE mode is used when all tasks should be triggered using an independent task handling server. That is, all carbon servers using such an external task handling server should be running on REMOTE mode, while the task handling server can be running on AUTO, STANDALONE or CLUSTERED mode.
Task Handling using WSO2 Task Server
To use WSO2 Task Server as the dedicated task handling server for all your Carbon products, you are required to route the task handling facility in each of your Carbon servers to the task server. That is, the
tasks-config.xml file in each of the Carbon servers should be configured as explained below.
To Configure the Carbon Product Servers
- Open the
tasks-config.xmlfile of your carbon server. You can find this file in the
Set the task server mode to REMOTE.
<taskclientdispatchaddress>should be the address to the same carbon server.
<remoteServerAddress>should be the url to the remote task server.
To Configure WSO2 Task Server
- Open the
tasks-config.xmlfile of the task server from the
- Set the task server mode to AUTO, STANDALONE or CLUSTERED. Use CLUSTERED mode if the task server installation is clustered.
The task server count should always be 0 for STANDALONE mode. If the mode is CLUSTERED, specify the number of clusters. Refer Product Clustering and Deployment Guide for more details.
Given below is how a
tasks-config.xmlfile is configured for a clustered task server, which has 3 instances:
<remoteServerAddress>parameters are not required.
- Give the user name and password for the remote task server.