ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Cannot delete messages from a local queue.

Post new topic  Reply to topic
 Cannot delete messages from a local queue. « View previous topic :: View next topic » 
Author Message
TheDude
PostPosted: Mon Feb 24, 2003 12:14 pm    Post subject: Cannot delete messages from a local queue. Reply with quote

Apprentice

Joined: 21 Oct 2002
Posts: 31

If messages build-up on a reply queue I should be able to issue the clear command to delete those messages from the queue. However, this is not the case because I get the following message:
AMQ8148 Object in use.

I am using MQ 5.2 Server on Win2K with a Java servlet (MQ Java not JMS)driving the transactions. I am closing the queues and committing the transactions in the code so I don't understand what is going on.

Thx in advance
Back to top
View user's profile Send private message
mqonnet
PostPosted: Mon Feb 24, 2003 12:24 pm    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

Check the ip/op procs to see if there are any openers to the queue. Which may or may not be your java servlet.

You sure that you committed all the transactions and closed the queues.

Cheers.
Kumar
_________________
IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
meekings
PostPosted: Tue Mar 04, 2003 4:36 pm    Post subject: Reply with quote

Voyager

Joined: 28 Jun 2001
Posts: 86
Location: UK, South West

If you inhibit get/put on the queue, and then re-enable it, this should cause the app that has the queue open to relinquish it so you can clear. Just be careful that whoever's attached doesn't get a contact admin surprise!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tillywern
PostPosted: Wed Mar 19, 2003 3:07 pm    Post subject: Reply with quote

Centurion

Joined: 28 Jan 2003
Posts: 109
Location: Colorado

The command to empty a queue is disabled whenever ipprocs or opprocs (an application has the queue open of input or output).

Create a program that will delete the messages by running as an application. Just discard the results....

The easiest way to do this is to modify the amqsbcg.c or amqsget.c samples provided with the product. The only thing you will probably have to change with amqsget.c is the max message size. Amqsbcg.c browses messages so it would have to be modified more significantly.

It is well worthwhile to create a generic queue loader, unloader and browser. This way you can always work with queues directly. Eventually it allows for automated testing.

One hitch to this approach is that if the queue is opened for input with an exclusive setting you will get an error message that tells you more than one process may not have the queue open of input.

Hope this helps
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
JohnMN
PostPosted: Thu Mar 20, 2003 8:42 am    Post subject: Reply with quote

Novice

Joined: 26 Feb 2003
Posts: 19

One slight change to what tillywern suggests: If you are deleting the messages anyway, allocate a very small buffer and set
MQGMO.Options=MQGMO_ACCEPT_TRUNCATED_MSG

You'll get RC=2079, but the message will be removed from the queue.
Back to top
View user's profile Send private message
HugoB
PostPosted: Tue Mar 25, 2003 7:26 am    Post subject: Reply with quote

Acolyte

Joined: 26 Jun 2001
Posts: 67

the command amqstrg can do miracle too !!!
Back to top
View user's profile Send private message
bduncan
PostPosted: Tue Mar 25, 2003 10:20 am    Post subject: Reply with quote

Padawan

Joined: 11 Apr 2001
Posts: 1554
Location: Silicon Valley

amqsbcg will only work if all the messages on the queue are expired. Then the act of simply browsing them will cause them to be removed from the queue.
_________________
Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator
Back to top
View user's profile Send private message Visit poster's website AIM Address
Ratan
PostPosted: Tue Mar 25, 2003 11:19 am    Post subject: Reply with quote

Grand Master

Joined: 18 Jul 2002
Posts: 1245

I use the 'q' program to do a distructive get to clear the queues with non zero ipprocs/opprocs. I like it. Dont remember the support pac in which it is available.

-Laze
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Cannot delete messages from a local queue.
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.