Server queue managers

A server usually runs on a server platform. A server can run server-side applications but can also run client-side applications. As with clients, a server can open connections to many other queue managers on both servers and clients. One of the main characteristics that differentiate a server from a client is that it can handle many concurrent incoming requests. A server often acts as an entry point for many clients into an WebSphere MQ Everyplace network .

Example MQeServer

MQeServer is the simplest server implementation.

This server can be started with the following command:

qm_server server_QMgr_name [-p private_reg_PIN]

You must supply the -p parameter if the queue manager uses a private registry. Otherwise, the queue manager's registry is treated as a file registry. The program activates the queue manager (including a channel listener listening on port 8081) and goes into an indefinite sleep.

Use ctrl-C to shut down the server.

To delete the constructed queue manager, use the example qm_delete.

When two queue managers communicate with each other, WebSphere MQ Everyplace opens a connection between the two queue managers. The connection is a logical entity that is used as a queue manager to queue manager pipe. Multiple connections may be open at any time.

The new parameters control the use of the connection. The MaxChannels parameter controls the maximum number of connections that can be open at any time. A special value of 0 means that the queue manager can handle an unlimited number of connections.

The following parameters control how incoming network requests are handled:

Listen
The network adapter that handles incoming network requests. For example this could be an http adapter or a pure tcp/ip adapter. As well as the adapter name, you can pass parameters that dictate how the adapter should listen. For instance Listen=Network::8082 means use the Network adapter where Network is an alias to listen on port 8082. (This assumes that the Network alias is set to either an http or a tcp/ip adapter.)

Network
This parameter is used to specify the adapter to use for network read and write requests, once the initial network request has been accepted. Usually this is the same as the adapter used on the Listen parameter.

TimeInterval
The time in seconds before idle connections are timed out. As connections are persistent logical entities that last longer than a single queue manager request, and can survive network breakages, it may be necessary to time out connections that have been inactive for a period of time.

Once the server has been initialized it must be activated.

When you activate a server the following occurs:

  1. A channel manager is started
  2. The queue manager is started
  3. The channel listener is started

Code to demonstrate server activation is provided in queue manager example Ex2.

Example MQePrivateServer

MQePrivateServer is an extension of MQeServer with the addition that it configures the queue manager and registry to allow for secure queues. See Security.



© IBM Corporation 2000, 2003. All Rights Reserved