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 » Clear message and amqrmppa application

Post new topic  Reply to topic Goto page Previous  1, 2, 3  Next
 Clear message and amqrmppa application « View previous topic :: View next topic » 
Author Message
HubertKleinmanns
PostPosted: Wed Sep 11, 2019 6:16 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

pcouas wrote:
Sorry
DISPLAY QSTATUS(E.MQEMMO2.MQEMMO3.X.205.QL) IPPROCS OPPROCS
--> OPPROCS(1)
DISPLAY QSTATUS(E.MQEMMO2.MQEMMO3.X.205.QL) TYPE(HANDLE) APPLTAG
--> APPLTAG(amqrmppa)


I was a second to late with my last thread.

The process "amqrmppa" has opend the queue for writing - and so you cannot at all CLEAR the queue.

A command
Code:
DISPLAY QSTATUS(E.MQEMMO2.MQEMMO3.X.205.QL) TYPE(HANDLE) CHANNEL

would show the name of the channel.
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
bruce2359
PostPosted: Wed Sep 11, 2019 6:18 am    Post subject: Reply with quote

Poobah

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

pcouas wrote:
Humm

I create the Queue with Java program and i test it by sending and reading message in this new Queue !
I juste want be sure there is no new messsage in tis Queue

Regards

The next time the app attempts to consume a message, a 2033 r/c will be thrown. r/c 2033 means 'no message available.'
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
HubertKleinmanns
PostPosted: Wed Sep 11, 2019 6:20 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

Vitor wrote:
Then in your place I would be very interested to discover why this queue manager process feels the need to open a handle to it.


pcouas, does your Java process come across a channel? Maybe, that you lock yourself?
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
HubertKleinmanns
PostPosted: Wed Sep 11, 2019 6:27 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

bruce2359 wrote:
The next time the app attempts to consume a message, a 2033 r/c will be thrown. r/c 2033 means 'no message available.'

As long as you do not read with CorrelID or MsgID or JMS selectors etc.

But a "DISPLAY QSTATUS ... CURDEPTH UNCOM" would help. The result must be:

Code:
AMQ8450I: Display queue status details.
   ...
   CURDEPTH(0)                             UNCOM(NO)

_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Wed Sep 11, 2019 6:35 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

HubertKleinmanns wrote:
Vitor wrote:
Then in your place I would be very interested to discover why this queue manager process feels the need to open a handle to it.


pcouas, does your Java process come across a channel? Maybe, that you lock yourself?


Shush.......he'll figure out it's the SVRCONN by himself in a minute.....



_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
HubertKleinmanns
PostPosted: Wed Sep 11, 2019 6:41 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

Vitor wrote:
Shush.......he'll figure out it's the SVRCONN by himself in a minute.....





_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
pcouas
PostPosted: Wed Sep 11, 2019 7:15 am    Post subject: Reply with quote

Voyager

Joined: 06 Sep 2011
Posts: 79

Yes i replace Clear by testing messages number
It'seems Channel as an timeout before closing !

Regards
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Sep 11, 2019 7:20 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

pcouas wrote:
It'seems Channel as an timeout before closing !


Really? I always wondered what those parameters on the channel definitions were for.


_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed Sep 11, 2019 7:22 am    Post subject: Reply with quote

Poobah

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

Vitor wrote:
pcouas wrote:
It'seems Channel as an timeout before closing !


Really? I always wondered what those parameters on the channel definitions were for.


Sarcasm.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Sep 11, 2019 7:24 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

bruce2359 wrote:
Vitor wrote:
pcouas wrote:
It'seems Channel as an timeout before closing !


Really? I always wondered what those parameters on the channel definitions were for.


Sarcasm.




"Do you know what irony is Baldrick?"
"Yes, it's like goldy or silvery but made of iron"
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
HubertKleinmanns
PostPosted: Wed Sep 11, 2019 7:27 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

Vitor wrote:
bruce2359 wrote:
Vitor wrote:
pcouas wrote:
It'seems Channel as an timeout before closing !


Really? I always wondered what those parameters on the channel definitions were for.


Sarcasm.




"Do you know what irony is Baldrick?"
"Yes, it's like goldy or silvery but made of iron"

_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
pcouas
PostPosted: Wed Sep 11, 2019 11:25 pm    Post subject: Reply with quote

Voyager

Joined: 06 Sep 2011
Posts: 79

Hi

Thanks for answer to an poor french Dev with no humour !
My new code to avoid clear
Code:
private Boolean isMessagesInQueue(String objectName, MqQmanager qm) throws PCFException, MQException, IOException, JrafMQException {

      Boolean isMessageInQueue=true;
      PCFMessageAgent pcfMessageAgent = null;
      try {

         PCFMessage request = new PCFMessage(CMQCFC.MQCMD_INQUIRE_Q_STATUS);
         request.addParameter(CMQC.MQCA_Q_NAME, objectName);
         request.addParameter(CMQCFC.MQIACF_Q_STATUS_ATTRS, new int[] { CMQC.MQIA_CURRENT_Q_DEPTH,CMQC.MQIA_OPEN_INPUT_COUNT,CMQC.MQIA_OPEN_OUTPUT_COUNT,CMQCFC.MQIACF_UNCOMMITTED_MSGS});

         pcfMessageAgent = openNewPCFMessageAgent(qm);

         PCFMessage[] responses = pcfMessageAgent.send(request);
         for (int i = 0; i < responses.length; i++) {
            if (((responses[i]).getCompCode() == CMQC.MQCC_OK) && ((responses[i]).getParameterValue(CMQC.MQCA_Q_NAME) != null)) {
               String name = responses[i].getStringParameterValue(CMQC.MQCA_Q_NAME);
               if (name != null) {
                  name = name.trim();
               }

                    Integer iprocs = responses[i].getIntParameterValue(CMQC.MQIA_OPEN_INPUT_COUNT);
                     //Integer oprocs = responses[i].getIntParameterValue(CMQC.MQIA_OPEN_OUTPUT_COUNT); //Peut etre a 1
               
               Integer depth = responses[i].getIntParameterValue(CMQC.MQIA_CURRENT_Q_DEPTH);
               Integer uncom= responses[i].getIntParameterValue(CMQCFC.MQIACF_UNCOMMITTED_MSGS);
               if(depth==0 && uncom==0 && iprocs==0){
                  isMessageInQueue=false;
               }
            }
         }
      } catch (MQException ex) {
         log.info("objet non trouve sur le Qmanager objectName:" + objectName + " reason:" + ex.getReason());
         throw new JrafMQObjetException(objectName, qm.getName(), clazz, ex);
      } finally {
         closePCFMessageAgent(qm.getName(), pcfMessageAgent);
      }
      return isMessageInQueue;

   }

PS
sorry for english level

Regards
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Sep 12, 2019 5:04 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

pcouas wrote:
PS
sorry for english level


We don't require good English in here; many posters are American and would struggle to achieve that.

I'm unclear what this code is intended to achieve. In the sense I'm not clear why you're trying to clear the queue, and if you are, why you're not altering the channel definition to a more suitable timeout value.

(You are, of course, not using any of the SYSTEM SVRCONN channels defined as part of the queue manager are you? You wouldn't be performing such a level of bad practice).

I mean if (for example) you want to empty the queue so that there are no messages on it prior to a new round of testing and there's an IPPROCS on the queue, why not simply you amqsget / RFHUtil / A.N.Other utility to destructively read all the messages off? Why so desparate to use CLEAR QUEUE?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Sep 12, 2019 5:32 am    Post subject: Reply with quote

Poobah

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

In other words, why the requirement to use the CLEAR QLOCAL administrative command?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Sep 12, 2019 5:51 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

bruce2359 wrote:
In other words, why the requirement to use the CLEAR QLOCAL administrative command?


Oui.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3  Next Page 2 of 3

MQSeries.net Forum Index » General IBM MQ Support » Clear 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.