Wednesday, July 27, 2011

Using Private Queues

Private queues are used to define a separate path for a request to the AR Server. If you have some script or API code reaching your AR Server, you may need to define a separate queue not to be blocked by the load of the AR Server. You can define a private queue under Server Information form -> Ports and Queues tab. Here you can state maximum and minimum threads to be used for this queue. When AR Server is started, private queue starts with the number of minimum threads and increase number of threads (if needed) till the maximum number of threads is reached. If you do not state in your API calls, Fast (390620) and List (390635) queues are used by default. In order to use a private queue (390654 in our case), you need to use the following schema in your code:

if (ARSetServerPort(&control, control.server, 4000, 390654, &arStatus) >= AR_RETURN_ERROR)
{
sprintf (ErrMsg, "Fatal error - changing the queue 390654 for user '%s' on server '%s'", control.user, control.server);
ERROR (ERR_FATAL, ProcessName, ErrMsg, 0);
LogArsStatus (&arStatus);
FreeARStatusList(&arStatus, FALSE);
return;
}
FreeARStatusList(&arStatus, FALSE);

No comments:

Post a Comment