This process involves two steps:
- Create the queue manager item.
- Start the queue manager.
Creating the queue manager requires two sets of parameters, one set for
the queue manager and one for the registry. Both sets of parameters are initialized.
The
queue store and the registry require directories.
Note: All calls
require a pointer to ExceptBlock and a pointer to the queue manager handle.
if (MQERETURN_OK == rc) {
MQeQueueManagerParms qmParams = QMGR_INIT_VAL;
MQeRegistryParms regParams = REGISTRY_INIT_VAL;
qmParams.hQueueStore = hQueueStore;
qmParams.opFlags = QMGR_Q_STORE_OP;
/* ... create the registry parameters -
minimum that are required */
regParams.hBaseLocationName = hRegistryDir;
display("Loading Queue Manager from registry \n");
rc = mqeQueueManager_new( &exceptBlock,
&hQueueManager,
hLocalQMName,
&qmParams,
®Params);
}
You can now start the queue manager and carry out messaging
operations:
/* Start the queue manager */
if ( MQERETURN_OK == rc ) {
display("Starting the Queue Manager\n");
rc = mqeQueueManager_start(hQueueManager,
&exceptBlock);
}