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 » IBM MQ API Support » Deleting a particular Message from the Queue

Post new topic  Reply to topic
 Deleting a particular Message from the Queue « View previous topic :: View next topic » 
Author Message
VijayGoparaju`
PostPosted: Mon Sep 15, 2008 2:19 am    Post subject: Deleting a particular Message from the Queue Reply with quote

Acolyte

Joined: 26 Aug 2008
Posts: 72

Hello All,

I am having a problem.I have to delete a particular message from the Queue. If I open the Queue in MQC.MQOO_INPUT_AS_Q_DEF using this mode, It will remove all the messages, If we open the Queue in MQC.MQOO_BROWSE Mode it will just Browse, But I want only a particular message to be deleted.So can I compare messageid with out browsing all the messages and directly going to that message by message id is it possible?
Please Help Me

Thanks & Regards,
Vijay....
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Sep 15, 2008 2:41 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

It is so possible. It is also described in the programmer's manual
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
VijayGoparaju`
PostPosted: Mon Sep 15, 2008 2:43 am    Post subject: Reply with quote

Acolyte

Joined: 26 Aug 2008
Posts: 72

How to go directly to that particular message? Please tell...
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Sep 15, 2008 2:46 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

fjb_saper wrote:
It is so possible. It is also described in the programmer's manual

_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
VijayGoparaju`
PostPosted: Mon Sep 15, 2008 2:49 am    Post subject: Reply with quote

Acolyte

Joined: 26 Aug 2008
Posts: 72

But, I am having small doubt, If we open the queue in MQC.MQOO_INPUT_AS_Q_DEF mode all the messages will be removed from the queue then how we will delete a particular message?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Sep 15, 2008 2:53 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

There is no substitute for reading and learning. Do you want us to program it for you as well? How much are you willing to pay us? Did you even check the documentation ? By the time elapsed between the posting the obvious answer is NO.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
VijayGoparaju`
PostPosted: Mon Sep 15, 2008 2:59 am    Post subject: Reply with quote

Acolyte

Joined: 26 Aug 2008
Posts: 72

Sorry Saper,
I have already read the Documentation,But this Doubt I am not able to clear thats why,
Sorry once again,
Vijay...
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Sep 15, 2008 3:01 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Your posts show that if you have read the documentation you did not understand it. Read it again. Use a dictionary. Ask for it from IBM in your native language...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
bruce2359
PostPosted: Mon Sep 15, 2008 5:54 am    Post subject: Reply with quote

Poobah

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

MQC.MQOO_INPUT_AS_Q_DEF tells mq that you want to open the queue for INPUT (not output) and the queue attribute value will determine if the open should be INPUT_SHARED or INPUT_EXCLUSIVE. Shared means any number of other applications can open it for INPUT at the same time; EXCLUSIVE means that your app wants to be the only app opening the queue.

An MQ application works with one message at a time (the next message - this is the default behavior. If your application loops through the code, this behavior will be repeated.

When you say you want to delete a particular message, how will you identify the message you want to delete? By the content of the application data portion of the message? If so, you will need to open the queue for input (MQOO), then mqget with browse (see MQGMO) each message (next message), then examine the application data, and mqget the message (destructively) under cursor (see MQGMO).

If you know the msgid and/or correlid of the specific message you want to delete, place these in the msgid and correlid of the MQMD before the mqget (destructively).

There are lots of sample programs available for you to look at. Go to Mr. Google, and look for mq+samples.
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Deleting a particular Message from the 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.