Author |
Message
|
dexter |
Posted: Sat Jan 07, 2012 9:24 am Post subject: How to read the last message on a queue? |
|
|
 Apprentice
Joined: 07 Jan 2011 Posts: 32 Location: Michigan, USA
|
MQ v7016, WMB v7002, SUSE Linux Enterprise Server v11
I have around 1.2 million messages on a queue.
I want to check when the test completed. The time when the last message was put to the queue would give me this information.
MQ Explorer only displays 500 msgs.
RFHUtil has a browse function, but it starts from the first msg.
So, can anyone tell me, using either RFHUtil, runmqsc or MQ Explorer, how I can browse the very last msg on the queue?
Thanks in advance. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Jan 07, 2012 10:05 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Locked the post on the other forum. Next time don't double post, ask / wait for a moderator to move it.
Well you finally realized that a queue is not a DB... good for you!
Now there are tools that will allow you to find out the answer to your question: example mqmonntp or MO71...
However this will still take quite some time as all messages still need to be browsed...
- You'd be better served by checking at what time your sending application finished the puts and did the last commit. (1st choice)
- Alternatively you can have the consuming application write out the information from the MQMD. It contains the put date and put time, albeit in GMT. (2nd choice as it will lack the time from the last put to the commit related to that put).
- If the messages came over a dedicated channel, look at the last message date and time over the channel.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Sat Jan 07, 2012 11:48 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
vennela |
Posted: Sun Jan 08, 2012 10:42 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Jeff:
Good solution.
But will QSTATUS give output even if the Queue is not in use. I mean like chstatus(*) saved all
I am currently not supporting MQ and don't have a MQ installation to test it myself. |
|
Back to top |
|
 |
bruce2359 |
Posted: Sun Jan 08, 2012 11:53 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Yes. _________________ 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 |
|
 |
fjb_saper |
Posted: Sun Jan 08, 2012 9:40 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
vennela wrote: |
Jeff:
Good solution.
|
Excellent solution from Jeff. Just wanted to stress once more as said in the documentation that the QMON attribute of the queue/qmgr cannot be none and needs to be set before the test is done, ideally before the test begins....
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
BBM |
Posted: Thu Jan 12, 2012 8:13 am Post subject: |
|
|
Master
Joined: 10 Nov 2005 Posts: 217 Location: London, UK
|
I believe you can set this even after the test is done and it still pulls back the required information. Fond this out by accident! |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jan 12, 2012 8:14 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
BBM wrote: |
I believe you can set this even after the test is done and it still pulls back the required information. Fond this out by accident! |
It still pulls back the time that the last message was put onto the queue.
Whether or not that's still the right "last message" is a different question. |
|
Back to top |
|
 |
BBM |
Posted: Thu Jan 12, 2012 9:21 am Post subject: |
|
|
Master
Joined: 10 Nov 2005 Posts: 217 Location: London, UK
|
|
Back to top |
|
 |
|