Author |
Message
|
Rahul999 |
Posted: Wed May 09, 2007 8:05 pm Post subject: How to Browse directly the nth message in a queue |
|
|
 Centurion
Joined: 14 Mar 2007 Posts: 134
|
Hi All,
I have a queue which consists of 12500 messages and i only want to look at 6587th message. Is there any way to browse a particular message.
Thnx in Adavnce  |
|
Back to top |
|
 |
Mr Butcher |
Posted: Wed May 09, 2007 10:38 pm Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
how do you know the message that you want is #6587? because you browsed them all and searched for the content?
anyway you either know the (unique) messageid/correlid so you can do a a single browse, or you have to browse all other messages before.... _________________ Regards, Butcher |
|
Back to top |
|
 |
Vitor |
Posted: Thu May 10, 2007 12:27 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Mr Butcher wrote: |
how do you know the message that you want is #6587? because you browsed them all and searched for the content?
|
And remember, if you browsed for it and found it, it may not be the 6587th message when you go back and look. You'd need to examine it once you've found it.
On a general point, it's seldom a good idea to hold large numbers of messages on a queue. If only because it's a pain to search and manage them - MQ is not a database. Better to offload them into a database, reloading them into a queue when it's time to process them (if ever). _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu May 10, 2007 11:01 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Vitor wrote: |
And remember, if you browsed for it and found it, it may not be the 6587th message when you go back and look. You'd need to examine it once you've found it.
|
Browse it with a lock and then it will be there. Unless it expires in the interm.
Vitor wrote: |
On a general point, it's seldom a good idea to hold large numbers of messages on a queue. If only because it's a pain to search and manage them - MQ is not a database. Better to offload them into a database, reloading them into a queue when it's time to process them (if ever). |
Amen. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
atheek |
Posted: Thu May 10, 2007 8:15 pm Post subject: |
|
|
 Partisan
Joined: 01 Jun 2006 Posts: 327 Location: Sydney
|
Rahul,
If you still want to do this, run this shell script (assuming ur platform is unix)
export PATH=$PATH:/opt/mqm/samp/bin;
start=`amqsbcg $1 $2| grep -n "MQGET of message number "$3" "$|awk '{FS=":";print $1}'`
next=`expr $3 + 1`
end=`amqsbcg $1 $2| grep -n "MQGET of message number "$next" "$|awk '{FS=":";print $1}'`
end=`expr $end - 1`
amqsbcg $1 $2 | sed -n $start,$end"p"
pass the following arguements to the script:
Name of Q, Name of QMGR, No. of the Message.
The script uses amqsbcg to display the message. |
|
Back to top |
|
 |
sidharth_bora |
Posted: Thu May 10, 2007 9:11 pm Post subject: |
|
|
 Voyager
Joined: 24 Nov 2005 Posts: 87
|
use paul clarkes / support pack where you can segregate the message by its contents... or use another GUI support pac to visullay see and select the message you want ..
regds |
|
Back to top |
|
 |
rameshtdp |
Posted: Fri May 11, 2007 4:57 am Post subject: How to get a particular number msg from a queue |
|
|
 Novice
Joined: 11 May 2007 Posts: 18 Location: India
|
You can get a paricular message from a queue; even queue depth at any number.
Plese use IBM tool mo71 and give the parameters in the respective tool as Queuemanager name and queuename.
Rgds,
Ramesh |
|
Back to top |
|
 |
Rahul999 |
Posted: Thu May 17, 2007 11:14 pm Post subject: |
|
|
 Centurion
Joined: 14 Mar 2007 Posts: 134
|
Hi Ramesh,
Can u send me the link for this tool mo71 . |
|
Back to top |
|
 |
elvis_gn |
Posted: Thu May 17, 2007 11:22 pm Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
|
Back to top |
|
 |
dkeister |
Posted: Fri May 18, 2007 9:02 am Post subject: |
|
|
Disciple
Joined: 25 Mar 2002 Posts: 184 Location: Purchase, New York
|
MQExerciser can do this with a GUI interface. _________________ Dean Keister |
|
Back to top |
|
 |
Rahul999 |
Posted: Mon May 21, 2007 9:51 pm Post subject: |
|
|
 Centurion
Joined: 14 Mar 2007 Posts: 134
|
Hey Dean,
Where can i find this MQ Exerciser.
If possible , send me the link
Thnx in Advance |
|
Back to top |
|
 |
dkeister |
Posted: Tue May 22, 2007 4:31 am Post subject: |
|
|
Disciple
Joined: 25 Mar 2002 Posts: 184 Location: Purchase, New York
|
Go to www.mqexerciser.com. When you download you will get Version 4 that has a number of new (and if I may be so bold) great features. However, I haven't had time to update the website to reflect the new features yet. _________________ Dean Keister |
|
Back to top |
|
 |
RogerLacroix |
Posted: Thu May 24, 2007 12:50 pm Post subject: Re: How to Browse directly the nth message in a queue |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
|
Back to top |
|
 |
|