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 » Can I peek at a message on a queue?

Post new topic  Reply to topic
 Can I peek at a message on a queue? « View previous topic :: View next topic » 
Author Message
IanB
PostPosted: Fri Oct 20, 2006 2:29 am    Post subject: Can I peek at a message on a queue? Reply with quote

Apprentice

Joined: 13 Oct 2006
Posts: 43

Is it possible to read a message from a queue without removing it from the queue? I know through the admin utility you can view messages on a queue and view them, so it must be possible, but I recall reading something in the last week that puts that in doubt from an api perspective.

Edit: Thinking about it, can I access them out of sequence or is it always lifo/fifo (I don't even know that)...

We're using V5.3 btw

Cheers
Ian


Last edited by IanB on Fri Oct 20, 2006 2:33 am; edited 1 time in total
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Oct 20, 2006 2:33 am    Post subject: Reply with quote

Grand High Poobah

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

You mean like the BROWSE functionality offered by the API, that sort of thing?

What did you read and where? I'd have gone with the Application Programming Guide section titled "Browsing messages from a queue" myself.
_________________
Honesty is the best policy.
Insanity is the best defence.


Last edited by Vitor on Fri Oct 20, 2006 2:37 am; edited 1 time in total
Back to top
View user's profile Send private message
IanB
PostPosted: Fri Oct 20, 2006 2:35 am    Post subject: Reply with quote

Apprentice

Joined: 13 Oct 2006
Posts: 43

Vitor wrote:
You mean like the BROWSE functionality offered by the API, that sort of thing?

What did you read and where?


Not sure, I've been reading so much MQ stuff over the last week it all sort of blurs into one I'll investigate browse, I assumed (as you do) it would be called peek but you search for peek and you just get 30 articles called "IBM peek into new websphere" and so on

Thanks for such a quick response, you're a star
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Oct 20, 2006 2:40 am    Post subject: Reply with quote

Grand High Poobah

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

There are a number of industry standard jokes about assumptions that I won't bother to repeat here.

It's not a separate function, it's an option, which I don't think I made completely clear. Again when writing code:

The Application Programming Guide Is Your Friend
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
IanB
PostPosted: Fri Oct 20, 2006 2:40 am    Post subject: Reply with quote

Apprentice

Joined: 13 Oct 2006
Posts: 43

Just stumbled over this:

A load of MQ resources

Haven't dug too deep yet, but looks like an interesting resource
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Oct 20, 2006 2:46 am    Post subject: Reply with quote

Grand High Poobah

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

IanB wrote:
Just stumbled over this:

A load of MQ resources

Haven't dug too deep yet, but looks like an interesting resource


Stumbled over it? So much for Roger L sponsoring a section in this forum!

Capitalware are also producing a series of really good tools and products (opinion not endorsement).
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Nigelg
PostPosted: Fri Oct 20, 2006 3:16 am    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

Quote:
The Application Programming Guide Is Your Friend


The Application Programming Reference is a better friend.
_________________
MQSeries.net helps those who help themselves..
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Oct 20, 2006 3:22 am    Post subject: Reply with quote

Grand High Poobah

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

Nigelg wrote:
Quote:
The Application Programming Guide Is Your Friend


The Application Programming Reference is a better friend.


In the early stages, and I think from previous posts it's not unkind to say that IanB is in the early stages of his MQ, the guide is a better starting point.

Once you've mastered the basics & found your stride I agree entirely that the Reference is the more useful publication.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Oct 20, 2006 3:25 am    Post subject: Re: Can I peek at a message on a queue? Reply with quote

Grand High Poobah

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

IanB wrote:

Edit: Thinking about it, can I access them out of sequence or is it always lifo/fifo (I don't even know that)...



Message sequence is a queue property that can't be varied by an application. MQ doesn't support lifo, is by default fifo but is commonly set to use message priority sequence. IIRC delivery is fifo within priority but I'm not certain if that's a product feature, just what normally happens or just what I think I've seen happening.

Exercise for the student there
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
IanB
PostPosted: Fri Oct 20, 2006 3:39 am    Post subject: Re: Can I peek at a message on a queue? Reply with quote

Apprentice

Joined: 13 Oct 2006
Posts: 43

Yep still a total noob, and I eschewed the normal baby steps for a head
first full on charge down hill screaming "GAARRR" all the way


Apologies to Roger L I hadn't realised, but the site looks good! I'll have to have a poke at your tools when I get a moment.

I think I'll take a leisurely browse through The Application Programming Guide now I've got a bit more time.

Thanks again all.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Oct 20, 2006 3:51 am    Post subject: Re: Can I peek at a message on a queue? Reply with quote

Grand High Poobah

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

IanB wrote:
Yep still a total noob, and I eschewed the normal baby steps for a head
first full on charge down hill screaming "GAARRR" all the way


No offence was intended nor was there any intended implication that your current state would persist.

The head first, full on charge is a viable strategy - though the level of success and/or pain does vary with the size of the subject you're attacking...
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
wschutz
PostPosted: Fri Oct 20, 2006 3:58 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Quote:
IIRC delivery is fifo within priority but I'm not certain if that's a product feature, just what normally happens or just what I think I've seen happening.
close.... it's based on the setting of MSGDLVSQ at the time of the PUT operation...either MSGDLVSQ(PRIORITY) or MSGDLVSQ(FIFO)
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Vitor
PostPosted: Fri Oct 20, 2006 4:08 am    Post subject: Reply with quote

Grand High Poobah

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

I took my own advice and RTFM'd

From the Command Reference:

Quote:
MSGDLVSQ Message delivery sequence.

This parameter is supported only on local and model queues.

PRIORITY Messages are delivered (in response to MQGET API calls) in first-in-first-out (FIFO) order within priority.

FIFO Messages are delivered (in response to MQGET API calls) in FIFO order. Priority is ignored for messages on this queue.



So it is a documented feature / behaviour. At least I remembered it did it this way, even if I wasn't sure why....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Oct 20, 2006 5:20 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Assuming one has a list of message ids or correlation ids - one can access the queue in any order one wants.
_________________
I am *not* the model of the modern major general.
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 » Can I peek at a 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.