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 » How to get Q depth of MQ Queue into message flow

Post new topic  Reply to topic
 How to get Q depth of MQ Queue into message flow « View previous topic :: View next topic » 
Author Message
remarbach
PostPosted: Mon Aug 25, 2008 10:53 am    Post subject: How to get Q depth of MQ Queue into message flow Reply with quote

Novice

Joined: 15 Feb 2002
Posts: 12
Location: Kaiser

Hi ALL

We are running WMB 6.0.2. We would like to create a message flow that takes a message off a queue, reads a queue name from the incoming message, go out and get the current queue depth of this queue and place this number into the body of the message and send it on.

Is this possible in 6.0.2 ? If so, what would be the approach?

TIA

Randt
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
fjb_saper
PostPosted: Mon Aug 25, 2008 11:00 am    Post subject: Re: How to get Q depth of MQ Queue into message flow Reply with quote

Grand High Poobah

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

remarbach wrote:
Hi ALL

We are running WMB 6.0.2. We would like to create a message flow that takes a message off a queue, reads a queue name from the incoming message, go out and get the current queue depth of this queue and place this number into the body of the message and send it on.

Is this possible in 6.0.2 ? If so, what would be the approach?

TIA

Randt

Look into support pack MS0B
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
PeterPotkay
PostPosted: Mon Aug 25, 2008 11:15 am    Post subject: Re: How to get Q depth of MQ Queue into message flow Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

remarbach wrote:
We are running WMB 6.0.2. We would like to create a message flow that takes a message off a queue, reads a queue name from the incoming message, go out and get the current queue depth of this queue and place this number into the body of the message and send it on.

I'm curious why you want to do this. You do realize that there are a number of reasons where the current q depth is not equal to the number of messages on the queue. Aside from that, 1 millisecond after you record the q depth, inaccurate as it may be in relation to available messages, its possible that number can go up or down, maybe significantly.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
remarbach
PostPosted: Mon Aug 25, 2008 5:28 pm    Post subject: Re: How to get Q depth of MQ Queue into message flow Reply with quote

Novice

Joined: 15 Feb 2002
Posts: 12
Location: Kaiser

PeterPotkay wrote:

I'm curious why you want to do this. You do realize that there are a number of reasons where the current q depth is not equal to the number of messages on the queue. Aside from that, 1 millisecond after you record the q depth, inaccurate as it may be in relation to available messages, its possible that number can go up or down, maybe significantly.


We have some scripts written in perl (using the MQSeries perl modules) that look at a list of queues .... for each queue in the list we want to see what the current qdepth or age is. Then based on the value of some configuration parameters for each queue, we will send an email to an operator to check the status of the application reading from the queue, if the depth is greater than the config value. We are looking at reimplementing this functionality in WMB 6.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
sunny_30
PostPosted: Mon Aug 25, 2008 7:38 pm    Post subject: Reply with quote

Master

Joined: 03 Oct 2005
Posts: 258

you can write a simple external-java-procedure to enquire the qdepth.

if ur using esql:
the ext-java procedure can be called the below way:

EXAMPLE:

Code:
CREATE FUNCTION QueueDepth(IN qmanager CHAR, IN queue CHAR) RETURNS INTEGER
       LANGUAGE JAVA
       EXTERNAL NAME "QueueDepth.getQueueDepth";


//sunny
Back to top
View user's profile Send private message
TJParsons
PostPosted: Thu Sep 04, 2008 8:07 am    Post subject: Reply with quote

Newbie

Joined: 19 Jun 2007
Posts: 3
Location: Winchester, UK

sunny_30 wrote:
you can write a simple external-java-procedure to enquire the qdepth.


sunny,
Are you aware of any documentation on writing such java procedures? (esp in regard to using the MQ libraries) I have a similar requirement but have never accessed MQ info from java before.
Back to top
View user's profile Send private message
mqmatt
PostPosted: Fri Sep 05, 2008 2:48 am    Post subject: Reply with quote

Grand Master

Joined: 04 Aug 2004
Posts: 1213
Location: Hursley, UK

Here's the doc you need: http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzaw.doc/uj10120_.htm
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 » WebSphere Message Broker (ACE) Support » How to get Q depth of MQ Queue into message flow
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.