Configuring Message Queue Polling |
To create a message queue polling server definition in the SAS Metadata Repository, perform the following steps:
In SAS Management Console, select the Server Manager and then select Actions New Server. The New Server Wizard appears.
Select Message Queue Polling Server and then click Next.
Specify a name and an optional description. Click Next.
Specify your configuration settings for the following fields:
specifies a command that is used to invoke SAS and process messages. You can modify the command to include invocation options.
In your SAS command or in the script that you use to invoke SAS, you must specify a SAS program file by using the -SYSIN option. The SAS program that you specify should contain messaging code to read messages from the queue and process the message contents.
select the credentials that are used to start SAS server sessions. The credentials that you specify must have permissions to access the resources, such as data libraries, that your SAS program will access.
If you select (None), then the object spawner's credentials are used to start the session.
specifies the machine where the polling server runs. The polling server must run on the same machine as an object spawner that it is associated with.
specifies the queue that the polling server monitors for messages.
Click Advanced Options. Specify the following options on the Polling tab:
specifies the maximum ratio of messages to server sessions. If the message threshold is exceeded, then the object spawner creates a new server session. The default value is 10 (10 messages t o 1 server session).
For example, a polling server is configured with a message threshold value of 10. The message queue contains 21 messages, and two server sessions are running. Because the ratio of messages per server session (10.5) is greater than the threshold value (10), the object spawner creates a new server session.
specifies the interval (in seconds) at which the server checks the depth of the message queue. The default value is 10.
specifies the maximum number of server sessions that are running. If you specify 0, then an unlimited number of server sessions can be created. The default value is 1.
specifies the minimum number of server sessions that are running. The default value is 0.
Note: If you specify 0, then one server session is created when the object spawner is started. Also, the object spawner maintains at least one server session if there are any messages in the queue.
specifies the time (in seconds) to wait for the server sessions to end when the object spawner is shutting down. If you specify a value that is greater than zero, and any server sessions are still running after the time has elapsed, then the spawner terminates the sessions. If you specify 0, then there is no time limit for the server sessions to end. The default value is 0.
It is recommended that you use the default value of 0. Make sure that the code that is run by your server sessions checks for stop messages. See Checking for Stop Messages.
Note: If you specify a value that is greater than zero, then the spawner log might contain an error message, "Failed to locate the server indicated in the kill request" for each server session that ended normally. These messages do not indicate a problem.
Note: If you specify a value that is greater than zero, then the spawner always waits the full timeout period when shutting down. For example, if you specify 30 seconds as the timeout value, then the spawner always waits 30 seconds to shut down, even if all of the server sessions end before 30 seconds.
If a spawner manages multiple polling servers, then the polling servers are shut down sequentially. The time delay for shutting down the spawner is cumulative.
On the WebSphere Options tab, specify whether the MQ Server interface is used for monitoring the queue depth. If you choose to use the MQ Server interface, then the object spawner and the queue manager must be on the same machine.
Note: If you do not choose the Server interface, then the connection to the remote queue manager must be defined on the object spawner machine. For more information, see Define the Queue Manager Connection on the Client Machine.
Click OK to return to the New Server Wizard, and then click Next.
Review your server settings, and then click Finish to create the server definition.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.