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 Discussion » Extract message(s) from queue based on positions range

Post new topic  Reply to topic
 Extract message(s) from queue based on positions range « View previous topic :: View next topic » 
Author Message
dexgk007
PostPosted: Wed Jul 01, 2009 12:44 am    Post subject: Extract message(s) from queue based on positions range Reply with quote

Newbie

Joined: 14 Apr 2009
Posts: 4

Hi All,
I'm developing a tool where a functionnality would consist in extracting from a queue messages based on their positions. As you can see in the WMQ Explorer, messages are displayed with a position number. Is it possible to access directly this position data (e.g. if a queue contains 10000 msgs and you want to extract msgs 9500 to 9550). I want to avoid the browsing of all previous messages present in the queue and I want to go directly to message "n° 9500". Is it possible ?
Back to top
View user's profile Send private message
exerk
PostPosted: Wed Jul 01, 2009 12:54 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

What happens if the position changes? How are you intending to handle that?
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Wed Jul 01, 2009 1:31 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

a queue is not a database. what you are trying to archive is not possible.
there is limited "direct" access in MQseries to messages.
read about the get options (filling msgid, corelid), read also about index on queue.

in addition, why are you developing tools that already exist (e.g. MO71 will display a range of messages).
_________________
Regards, Butcher
Back to top
View user's profile Send private message
exerk
PostPosted: Wed Jul 01, 2009 1:35 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Mr Butcher wrote:
...in addition, why are to developing tools that already exist (e.g. MO71 will display a range of messages).


Because it's always fun to reinvent the wheel...
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jul 01, 2009 2:58 am    Post subject: Re: Extract message(s) from queue based on positions range Reply with quote

Grand High Poobah

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

dexgk007 wrote:
Is it possible ?


No, and it's both silly (as previous posters have commented) and dangerous (as previous posters have commented).

Say you decide (by some means that doesn't involve browsing!) that you want to extract messages 9500 to 9550. Firstly you should be slightly concerned that you've over 9000 messages sitting on a queue. You then use this tool to extract the 50 messages you want. You then discover than 10 messages with a higher priority have been placed on the queue, and message 9000 isn't what it was when you examined the queue.

Or worse still you don't discover this, and process the 50 messages extracted as if they're the 50 messages you think they are.

What on earth is the requirement here? What possible use is this sort of thing? Unless of course you are trying to use the queue as a database as my most worthy associate has suggested. This, as he says, is a bad thing to do.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Wed Jul 01, 2009 9:22 pm    Post subject: Re: Extract message(s) from queue based on positions range Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

dexgk007 wrote:
Hi All,
I'm developing a tool where a functionnality would consist in extracting from a queue messages based on their positions. As you can see in the WMQ Explorer, messages are displayed with a position number. Is it possible to access directly this position data (e.g. if a queue contains 10000 msgs and you want to extract msgs 9500 to 9550). I want to avoid the browsing of all previous messages present in the queue and I want to go directly to message "n° 9500". Is it possible ?


No. MQ only provides browse-first and browse-next options.

A tool like this would be ok if there was nothing else putting or getting on the queue at the time (ie. the contents was static), but as has been pointed out, it does not have any useful meaning when the queue depth is going up and down all the time. There are existing tools that allow access to ranges of messages but they all use the browse-first browse-next method.
_________________
Glenn
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 Discussion » Extract message(s) from queue based on positions range
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.