|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Cannot clear or delete a local queue |
« View previous topic :: View next topic » |
Author |
Message
|
TheDude |
Posted: Tue Aug 12, 2003 9:39 am Post subject: Cannot clear or delete a local queue |
|
|
 Apprentice
Joined: 21 Oct 2002 Posts: 31
|
Howdy,
I am running MQ5.3 on WAS 5.0/Linux sending requests to a TPF mainframe. The problem that I am having is messages queueing up on either the xmitq or the reply queue on the app server. no errors are found in the error logs and the channels are still in running status. Also, my application is retreiving messages from the reply queue based on matching the correlID/machineID of the request & reply messages, but when this "stalled" or queueing condition occurs the application times-out with a 2033.
When I try to clear or delete the queue I get a "queue not empty" or "queue in use" message. So far the only way that I have found to get rid of the messages is to stop all channels and stop/start the queue manager -- NOT ACCEPTABLE.
Below is a snippet of the code from my Data Access Object, perhaps there is a coding fix in my application that can be applied.
try {
qMgr = new MQQueueManager(mqValueBean.getQueueManager());
MQQueue targetQueue = qMgr.accessQueue(mqValueBean.getLocalQueue(),mqValueBean.getOutputOptions());
//Put the message on the Queue
targetQueue.put(sendMsgDAO, mqValueBean.getPutMessageOptions());
targetQueue.close();
MQQueue responseData = qMgr.accessQueue(mqValueBean.getReplyQueue(),mqValueBean.getInputOptions());
recvMsgDAO.correlationId = sendMsgDAO.messageId;
CASLoggers.auditLogger().text(IRecordType.TYPE_ERROR, auditClass, auditMethod, "Rcvr" );
responseData.get(recvMsgDAO, mqValueBean.getGetMessageOptions());
responseData.close();
recvMessageSize = recvMsgDAO.getTotalMessageLength();
qMgr.disconnect();
Thanks in advance
The Dude! |
|
Back to top |
|
 |
vennela |
Posted: Tue Aug 12, 2003 9:46 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
In order to clear a queue, the queue should not be opened for INPUT. To know (since you are on version 5.3) you can find what applications are keeping the queue opened(qstatus command). Either you must stop those apps or kill those apps and get rid of the ipprocs. Then you will be able to clear the queues
You CANNOT delete a queue until it is empty.
For more info on qstatus search this site |
|
Back to top |
|
 |
TheDude |
Posted: Tue Aug 12, 2003 9:59 am Post subject: |
|
|
 Apprentice
Joined: 21 Oct 2002 Posts: 31
|
When I issue the qstatus command on the xmitq all I get is:
AMQ8450: Display queue status details.
QUEUE(VPAXCS01.XMITQ) IPPROCS(0)
OPPROCS(0) CURDEPTH(3)
UNCOM(YES)
I really don't know what this means. |
|
Back to top |
|
 |
vennela |
Posted: Tue Aug 12, 2003 10:05 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
If there are messages on the XMITQ then most likely the channels are not running. If you start the relevant channels then the messages should go away.
If there is some other queue that has messages and if you want to know what has opened the queue then use the qstatus command to find the application id or PID.
There are some examples in this thread.
http://www.mqseries.net/phpBB2/viewtopic.php?t=9221&highlight=qstatus
Hope this helps |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|