Stopping a queue manager using the closeQuiesce method
This method closes a Queue Manager, specifying a delay to allow existing internal processes to finish normally. Note that this delay is only implemented as a series of 100ms pause and retry cycles. Calling this method prevents any new activity, such as transmitting a message, from being started, but allows activities already in progress to complete. The delay is a suggestion only, and various JVM dependant thread scheduling factors could result in the delay being greater. If the activities currently in progress finish sooner, then the method returns before the expiry of the quiesce duration.
If the queue has not closed at the expiry of this period, it is forced to close.
MQeQueueManager qmgr = new MQeQueueManager(); MQeMsgObject msgObj = null; try { qmgr.putMessage(null, "MyQueue", msgObj, null, 0); } catch (MQeException e) {// Handle the exception here } qmgr.closeQuiesce(3000); // close QMgr