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 IndexGeneral IBM MQ SupportClear message and amqrmppa application

Post new topicReply to topic Goto page Previous  1, 2, 3
Clear message and amqrmppa application View previous topic :: View next topic
Author Message
pcouas
PostPosted: Thu Sep 12, 2019 8:22 pm Post subject: Reply with quote

Voyager

Joined: 06 Sep 2011
Posts: 76

Hi

" why not simply you amqsget / RFHUtil / A.N.Other utility to destructively read all the messages off? Why so desparate to use CLEAR QUEUE?"
This "amqsget / RFHUtil " could be coded in Java with PCF Commands ?

Regards
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Sep 13, 2019 4:09 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25823
Location: Ohio, USA

pcouas wrote:
This "amqsget / RFHUtil " could be coded in Java with PCF Commands ?




These utilities would simply read the queue until it's empty.

So if you want to write a piece of Java that reads the queue until it's empty, go for it.

The point that I and others are making is that this is a commonly used way of clearing a queue with an open handle on it and there are utilities available to assist if you choose to use them. If you instead choose to roll your own, go for it.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Andyh
PostPosted: Sun Sep 15, 2019 10:06 pm Post subject: Reply with quote

Disciple

Joined: 29 Jul 2010
Posts: 172

It wasn't 100% clear to me from the initial post whether the amqrmppa was acting on behalf of a message channel, or a client channel.
Assuming the former, a receiver channel will keep a cache of queue handles open to avoid the overheads associated with opening the queue each time a message is sent down the channel.
If the handle hasn't been used recently then it should be pruned automatically, while if messages are still arriving over the channel you'd need to stop the channel to close the handle.
Using a repeating MQGET doesn't carry the same guarantees as CLEAR QL, for example a message which is locked to a UOW or a browse cursor would be invisible to an MQGET.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Mon Sep 16, 2019 4:34 pm Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2017
Location: Melbourne, Australia

As an aside, app messaging designs using MQ should not have any requirement to "clear queues" or "drain queues". There should be a well-behaved consumer app, or otherwise the messages should not be produced in the first place.

We have hundreds of MQ messaging interfaces using many different producer and consumer app technologies (including Java MQ classes, JMS, IIB, .Net), and we never need to clear any queues under normal operations.
_________________
Glenn
Back to top
View user's profile Send private message
sderiis
PostPosted: Wed Oct 02, 2019 1:24 pm Post subject: Reply with quote

Newbie

Joined: 02 Oct 2019
Posts: 2

Ok
But This channel could block CLEAR QUEUE operation and giving an 4004 Error ?
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed Oct 02, 2019 2:22 pm Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 8501
Location: US: west coast, almost. Otherwise, enroute.

... and in any case, when I'm asked to clear any prod queue, I get a signed waiver from mgt. relieving me of any downstream responsibility for loss of data.
_________________
There are two types of people in this world:
1) Those that can extrapolate from incomplete data
Back to top
View user's profile Send private message
HubertKleinmanns
PostPosted: Mon Oct 07, 2019 12:03 am Post subject: Reply with quote

Yatiri

Joined: 24 Feb 2004
Posts: 696
Location: Germany

sderiis wrote:
Ok
But This channel could block CLEAR QUEUE operation and giving an 4004 Error ?


Any application, which has a handle on a queue, blocks CLEAR QLOCAL.

This could be

- a channel

- the DLQ handler

- other application
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
PaulClarke
PostPosted: Mon Oct 07, 2019 10:44 am Post subject: Reply with quote

Guardian

Joined: 17 Nov 2005
Posts: 945
Location: New Zealand

If you are trying to use MO71 to clear a queue and you can't because someone has the queue open then you can use the good old fashioned way of getting every message off the queue. In the message browse window just right click and then select 'Apply to all messages'. Your Delete button will change to 'Delete All'. Pressing that will now delete all messages from the queue.

Cheers,

Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:
Post new topicReply to topic Goto page Previous  1, 2, 3 Page 3 of 3

MQSeries.net Forum IndexGeneral IBM MQ SupportClear message and amqrmppa application
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.