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 Performance Monitoring » Selective read on a queue based on message content

Post new topic  Reply to topic
 Selective read on a queue based on message content « View previous topic :: View next topic » 
Author Message
jarun111
PostPosted: Mon May 18, 2009 8:05 am    Post subject: Selective read on a queue based on message content Reply with quote

Acolyte

Joined: 19 Apr 2004
Posts: 70

Hi,
Is there a way to remove only messages that has some specific pattern on the message content. Message is a Text message and it does not use message header. Let me know.

Thanks
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon May 18, 2009 8:59 am    Post subject: Re: Selective read on a queue based on message content Reply with quote

Grand High Poobah

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

jarun111 wrote:
Message is a Text message and it does not use message header.


If you want to do this with a tool (given where you've posted), one way would be to unload the queue to a file, clear the required messages from the file & reload the queue.

As you talk about a Text message, I theorise you have a Java perspective on the message. You could in theory write a small Java app that uses message selectors to selectivly read messages from the queue. Exact details from another poster who knows more about Java than I do!

Other methods are undoubtably possible.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
vol
PostPosted: Mon May 18, 2009 10:40 pm    Post subject: Reply with quote

Acolyte

Joined: 01 Feb 2009
Posts: 69

Read up on msg properties in WMQ v7
Back to top
View user's profile Send private message
zpat
PostPosted: Mon May 18, 2009 11:22 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

You don't say if this is an application requirement or an admin task.

JMS selectors would be one way for applications (browsing and then get under browse cursor would be another), for admin support pac MO71 can unload or purpge messages with certain contents.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue May 19, 2009 4:44 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Once a message is on a queue, the only way to do anything based on the existing contents of the existing message is to browse it,inspect the contents, and then decide what to do.

This means you must browse every message on the queue and decide what to do for each one. Various tools, like M071, can do this. You could, if you were feeling like making your life difficult, use MQ Explorer to manually examine every message,and then record the Message ID of each message you want to pull, and then write something to remove those messages.

Other ways may make more sense, but you still need to non-destructively read *every* message on the queue.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue May 19, 2009 8:59 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

mqjeff wrote:
Once a message is on a queue, the only way to do anything based on the existing contents of the existing message is to browse it,inspect the contents, and then decide what to do.

This means you must browse every message on the queue and decide what to do for each one. Various tools, like M071, can do this. You could, if you were feeling like making your life difficult, use MQ Explorer to manually examine every message,and then record the Message ID of each message you want to pull, and then write something to remove those messages.

Other ways may make more sense, but you still need to non-destructively read *every* message on the queue.




Here a little word of advice model wise: (just wanted to add to Jeff's post for the newbies out there. Jeff is well versed with this design....)

For message content based routing the most efficient way is to write a little program that processes all messages from the input queue, routes them to the relevant destination queue and moves messages it can't route to an unresolved queue. Leaving messages untouched in the input queue is a recipe for pain and performance degradation....

Now with the new attributes of Version 7 and the version 7 servers you do have alternatives that are both powerfull and efficient, an allow for good performance.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Performance Monitoring » Selective read on a queue based on message content
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.