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 » Browse Message

Post new topic  Reply to topic
 Browse Message « View previous topic :: View next topic » 
Author Message
michelz
PostPosted: Tue Aug 06, 2002 3:57 am    Post subject: Browse Message Reply with quote

Novice

Joined: 05 Feb 2002
Posts: 10
Location: Michel Zohar

How can i browse a message in a specific position?
Back to top
View user's profile Send private message MSN Messenger
bob_buxton
PostPosted: Tue Aug 06, 2002 4:09 am    Post subject: Reply with quote

Master

Joined: 23 Aug 2001
Posts: 266
Location: England

What do you mean by 'a specific position'?

You can supply message id, correlid and/or group id and the appropriate MQMO_MATCH_xxx options to specify the criteria used to locate messages.

But if you want to find the 21st message on the queue I don't think you can without a get-next loop

Bob
_________________
Bob Buxton
Ex-Websphere MQ Development
Back to top
View user's profile Send private message
michelz
PostPosted: Tue Aug 06, 2002 4:49 am    Post subject: Reply with quote

Novice

Joined: 05 Feb 2002
Posts: 10
Location: Michel Zohar

I need to implement paging on the messages, suppose i need messages from 1500 to 1550!

It will be vary bad to browse next messages until the required messages.


Thanks
Back to top
View user's profile Send private message MSN Messenger
bduncan
PostPosted: Tue Aug 06, 2002 5:10 am    Post subject: Reply with quote

Padawan

Joined: 11 Apr 2001
Posts: 1554
Location: Silicon Valley

The whole concept of a queue is FIFO. You simply cannot get around the inherent structure of the queue. Even if an API programmatically allows you to specify message # X, it will still need to do a linear traversal across X-1 positions before arriving at the desired message. The same thing applies when you try to get a message based on CorrelId or some other matching parameter. The queue manager must position the cursor at the front of the queue and begin a linear traversal until reaching the desired message.
_________________
Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator
Back to top
View user's profile Send private message Visit poster's website AIM Address
nimconsult
PostPosted: Tue Aug 06, 2002 10:43 pm    Post subject: Reply with quote

Master

Joined: 22 May 2002
Posts: 268
Location: NIMCONSULT - Belgium

Michel,

A usual browsing technique consist in keeping a key of the last item of the list. When a "page down" is requested, position on the key and browse onward.

For MQ you could keep the message id (assuming there is one) to reposition yourself in the queue.
_________________
Nicolas Maréchal
Senior Architect - Partner

NIMCONSULT Software Architecture Services (Belgium)
http://www.nimconsult.be
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bob_buxton
PostPosted: Tue Aug 06, 2002 11:46 pm    Post subject: Reply with quote

Master

Joined: 23 Aug 2001
Posts: 266
Location: England

MQ can and does maintain a browse cursor for sequential browsing of the queue. But the queue is (normaly) a very dynamic thing with messages being added and removed all the time.

So it normally does not make sense to ask for messages 1500-1550 on a queue. What was message 1550 may become message 1 in the queue so MQ does not provide the facility to request messages by ordinal number.
Instead it provides the facilities to search for specific message id and correlids etc. If you know you will doing a lot of searches for specific messages you can index the queue to improve search performance.

I still do not understand why you thnk you need to find a message by position.

Bob
_________________
Bob Buxton
Ex-Websphere MQ Development
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 » Browse Message
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.