Creating a queue manager

The basic steps required to create a queue manager are:

  1. Create and activate an instance of MQeQueueManagerConfigure
  2. Set queue manager properties and create the queue manager definition
  3. Create definitions for the default queues
  4. Close the MQeQueueManagerConfigure instance

1. Create and activate an instance of MQeQueueManagerConfigure

You create the MQeQueueManagerConfigure object by calling the mqeQueueManagerConfigure_new function. Apart from the ExceptionBlock and the new MQeQueueManagerConfigure Handle, this function takes two additional parameters.

The method of operation depends on these parameters. 'NULL' can be passed for these parameters, in which case mqeQueueManagerConfigure_activate is called immediately after mqeQueueManagerConfigure_new. Alternatively startup parameters can be passed.

The first parameter is an MQeFields object that contains initialization parameters for the queue manager. These must contain at least the following:

The directory name is stored as part of the queue manager definition and is used as a default value for the queue store in any future queue definitions. The directory does not have to exist and will be created when needed.

The example code includes creating an instance of MQeQueueManagerConfigure.

2. Set queue manager properties and create the queue manager definition

When you have activated MQeQueueManagerConfigure, but before you create the queue manager definition, you can set some or all of the following queue manager properties:

Call mqeQueueManagerConfigure_defineQueueManager( ) to create the queue manager definition. This creates a registry definition for the queue manager that includes any of the properties that you set previously.

At this point you can close() and free() MQeQueueManagerConfigure and run the queue manager, however, it cannot do much because it has no queues. You cannot add queues using the administration interface, because the queue manager does not have an administration queue to service the administration messages.

The following sections show how to create queues and make the queue manager useful.

3. Create definitions for the default queues

MQeQueueManagerConfigure allows you to define the following four standard queues for the queue manager:

All these functions return an error if the queue already exists.

The administration queue and administration reply queue are needed to allow the queue manager to respond to administration messages, for example to create new connection definitions and queues.

The dead letter queue can be used to store messages that cannot be delivered to their correct destination.

The default local queue, SYSTEM.DEFAULT.LOCAL.QUEUE, has no special significance within WebSphere MQ Everyplace itself, but it is useful when WebSphere MQ Everyplace is used with WebSphere MQ messaging because it exists on every WebSphere MQ messaging queue manager.

4. Close the MQeQueueManagerConfigure instance

When you have defined the queue manager and the required queues, you can close() MQeQueueManagerConfigure and run the queue manager. Once the close() function has been completed, the handle to the MQeQueueManagerCondigure must to be freed by calling the free() function

The registry definitions for the queue manager and the required queues are created immediately. The queues are not created until they are activated.



© IBM Corporation 2000, 2003. All Rights Reserved