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 » WebSphere Message Broker (ACE) Support » identifying flow that is reading from queue

Post new topic  Reply to topic
 identifying flow that is reading from queue « View previous topic :: View next topic » 
Author Message
paustin_ours
PostPosted: Fri May 17, 2013 6:42 am    Post subject: identifying flow that is reading from queue Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 667
Location: columbus,oh

i can tell which EG process is having a MQ queue open using the display qstatus. How can i tell which flow has the queue open?

can think of a way to tell this. Please let me know.
Back to top
View user's profile Send private message Yahoo Messenger
zpat
PostPosted: Fri May 17, 2013 7:04 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

You can usually tell by looking at the flow properties in MBX and seeing which queues each flow is using in their MQ nodes.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri May 17, 2013 7:04 am    Post subject: Re: identifying flow that is reading from queue Reply with quote

Grand High Poobah

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

paustin_ours wrote:
i can tell which EG process is having a MQ queue open using the display qstatus. How can i tell which flow has the queue open?


By using the deploy document you generate as part of your change control process.

Seriously. You should have a document describing what resources a flow uses because it's really hard to reverse engineer it.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
paustin_ours
PostPosted: Fri May 17, 2013 7:36 am    Post subject: Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 667
Location: columbus,oh

Who has time to read documents when you are in a 2 a.m support call

reverse engineering sounds like a better option though it is harder
Back to top
View user's profile Send private message Yahoo Messenger
dogorsy
PostPosted: Fri May 17, 2013 7:49 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

you know what execution group, so if you also know what bar files were deployed to that EG, then you can you the mqsireadbar command, that will list the attributes for each flow, search for the queue name
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri May 17, 2013 7:55 am    Post subject: Reply with quote

Grand High Poobah

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

paustin_ours wrote:
Who has time to read documents when you are in a 2 a.m support call


The support guy called out of bed?

paustin_ours wrote:
reverse engineering sounds like a better option though it is harder


IMHO at 2am you want easy and straightforward. That's why we use documents here in a central library. Also by "documents" I don't mean a 5 volume set bound in leather. We have a 2 page cheet sheet for each application that describes this, and interestingly the stage gate test the document has to pass through is described as "sufficient for a support person with no previous experience of the application to triage any issue if called at 3am".
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
new2z
PostPosted: Fri May 17, 2013 12:29 pm    Post subject: Reply with quote

Novice

Joined: 16 May 2013
Posts: 15

I can think of a menial and risky way of doing it

Precondition
-----
1. You should have messages in your queue
2. You should be able to stop all the flows in your EG

Once all flows are stopped, you can start the message flows one after another at a specified interval. Till the time your messages don't clear, those are not the flow you are looking for.

If you have just started a flow, and messages start clearing in the queue, then it is the one

If you do not have a manual/document to figure which queue is for which flow, then this is one effective way. But risky because you are stopping a flow. You might want to test this in your QA or Stage environment.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Fri May 17, 2013 2:51 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

I don't disagree that documentation can be very helpful.
But just because a doc says Message Flow ABC_123 is the one that has uses Queue_XYZ, it doesn't necessarily prove what flow actually has the queue open.

Trust that documentation, but verify independently.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
paustin_ours
PostPosted: Fri May 17, 2013 7:04 pm    Post subject: Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 667
Location: columbus,oh

Hoping to get some ideas related to finding the thread details under the EG process and somehow associate the queue to that thread. Along those lines.

Is this possible? Should i maybe ask a UNIX admin for some help?
Back to top
View user's profile Send private message Yahoo Messenger
mapa
PostPosted: Sun May 19, 2013 10:16 am    Post subject: Reply with quote

Master

Joined: 09 Aug 2001
Posts: 257
Location: Malmö, Sweden

The proper way to do it is to keep an ID in the artifacts that can easily search for in lightweight documentation, like a wiki. More or less as already suggested.

Still, being a bit bored I did a quick and ugly Groovy hack that finds the flow(s) containing the queue you search for in that EG using mqsireportproperties...

Code:

C:\var>groovy findQ.groovy
usage: findQ
 -b,--broker <arg>   Broker name
 -e,--eg <arg>       ExecutionGroup name
 -q,--queue <arg>    Queue name

C:\var>groovy findQ.groovy -b MB8BROKER -e default -q TEST.IN
Messageflows containing queue TEST.IN: label='SimpleTestFlow'


Code:

def cli = new CliBuilder()
cli.with {
     usage: 'findQ'
     q longOpt:'queue', 'Queue name', args:1
     b longOpt:'broker', 'Broker name',args:1
     e longOpt:'eg', 'ExecutionGroup name',args:1
}
def opt = cli.parse(args)

if( args.length == 0) {
    cli.usage()
    return
}

def EG= opt.e ?: 'default'
def BROKER = opt.b ?: 'MB8BROKER'
def Q = opt.q ?: 'TEST.IN'


String result = "mqsireportproperties ${BROKER} -e ${EG} -o AllMessageFlows -r".execute().in.text

def res = result =~ /MessageFlow|label='.*'|queueName='${Q}'/
MessageFlowMatch flowMatch
def skipNextLabel
def matchingFlows = []

res.each { it ->
  if (it == 'MessageFlow') {
    flowMatch = new MessageFlowMatch()
    skipNextLabel = false
    matchingFlows.add(flowMatch)

  }
  else if (it.startsWith('label')) {
    if (! skipNextLabel) {
      flowMatch.label = it
      skipNextLabel = true
    }
  }
  else {
    flowMatch.queueName = it
  }
 
}

matchingFlows.findAll { it.queueName =~ /${Q}/ }.each { println "Messageflows containing queue ${Q}: ${it.label}" }

class MessageFlowMatch {

String label
String queueName

}
Back to top
View user's profile Send private message Visit poster's website
paustin_ours
PostPosted: Sun May 19, 2013 10:20 pm    Post subject: Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 667
Location: columbus,oh

Thanks mapa. I beleive thats the best solution yet in finding the information programatically.
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » identifying flow that is reading from 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.