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 » How to read the last message on a queue?

Post new topic  Reply to topic
 How to read the last message on a queue? « View previous topic :: View next topic » 
Author Message
dexter
PostPosted: Sat Jan 07, 2012 9:24 am    Post subject: How to read the last message on a queue? Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Sat Jan 07, 2012 10:05 am    Post subject: Reply with quote

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...

  1. You'd be better served by checking at what time your sending application finished the puts and did the last commit. (1st choice)

  2. 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).

  3. 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
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Sat Jan 07, 2012 11:48 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=%2Fcom.ibm.mq.csqzaj.doc%2Fsc12280_.htm
Back to top
View user's profile Send private message
vennela
PostPosted: Sun Jan 08, 2012 10:42 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
bruce2359
PostPosted: Sun Jan 08, 2012 11:53 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Sun Jan 08, 2012 9:40 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
BBM
PostPosted: Thu Jan 12, 2012 8:13 am    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Thu Jan 12, 2012 8:14 am    Post subject: Reply with quote

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
View user's profile Send private message
BBM
PostPosted: Thu Jan 12, 2012 9:21 am    Post subject: Reply with quote

Master

Joined: 10 Nov 2005
Posts: 217
Location: London, UK

good point Jeff
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 » General IBM MQ Support » How to read the last message on a 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.