Define a Message Queue Polling Server

To create a message queue polling server definition in the SAS Metadata Repository, perform the following steps:
  1. In SAS Management Console, select the Server Manager and then select Actionsthen selectNew Server. The New Server Wizard appears.
  2. Select Message Queue Polling Server and then click Next.
  3. Specify a name and an optional description. Click Next.
  4. Specify your configuration settings for the following fields:
    Command
    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.
    Multiuser credentials
    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.
    Server machine list
    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.
    Queue
    specifies the queue (or destination) that the polling server monitors for messages.
  5. Click Advanced Options.
    For JMS polling servers, specify the following options on the Polling tab:
    Maximum sessions
    specifies the maximum number of concurrent server sessions.
    Minimum sessions
    specifies the number of server sessions that are kept running. If you specify 0, then one server session is running.
    Note: If the value of Minimum sessions is greater than the value of Maximum sessions, then the value of Maximum sessions is used.
    Queue polling process timeout
    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 time-out period when shutting down. For example, if you specify 30 seconds as the time-out 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.
    For WebSphere MQ polling servers, specify the following options on the Polling tab:
    Message threshold
    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.
    Queue polling timeout
    specifies the interval (in seconds) at which the server checks the depth of the message queue. The default value is 10.
    Maximum sessions
    specifies the maximum number of concurrent server sessions. If you specify 0, then an unlimited number of server sessions can be created. The default value is 1.
    Minimum sessions
    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.
    Queue polling process timeout
    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 time-out period when shutting down. For example, if you specify 30 seconds as the time-out 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.
  6. For WebSphere MQ polling servers, select the WebSphere Options tab and 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.
  7. Click OK to return to the New Server Wizard, and then click Next.
  8. Review your server settings, and then click Finish to create the server definition.