Author |
Message
|
albitkw |
Posted: Wed Jul 26, 2006 11:01 am Post subject: Reading Queue Manager/Queue Parameters from ESQL |
|
|
Novice
Joined: 02 May 2005 Posts: 15 Location: Pittsburgh, PA
|
Is there a way to access a queue manager from an ESQL message flow to see the contents or depth of any queue from ESQL? If ESQL cannot do this, can it be done with a Java class running in the broker?  |
|
Back to top |
|
 |
wschutz |
Posted: Wed Jul 26, 2006 11:05 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
I'd go for the java node, the you can just use the java equivalent of MQINQ. I was involved in a rather long post last autumn about sending messages to the command server from ESQL, it works but is a tad messy.....
btw...why would you want to do this from a message flow? _________________ -wayne |
|
Back to top |
|
 |
albitkw |
Posted: Wed Jul 26, 2006 11:29 am Post subject: |
|
|
Novice
Joined: 02 May 2005 Posts: 15 Location: Pittsburgh, PA
|
We want to see if it's feasible to place messages on an output queue only if the number of message on the queue is less than a certain amount.
Without knowing all the detals, there's some concern that too many messages at one time can overload a subsequent process. |
|
Back to top |
|
 |
wschutz |
Posted: Wed Jul 26, 2006 11:37 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Provided the output queue will always be a local queue, you should be able to use the getCurrentDepth() method.
One wonders what you'll do if you think the queue is too deep? _________________ -wayne |
|
Back to top |
|
 |
albitkw |
Posted: Wed Jul 26, 2006 11:47 am Post subject: |
|
|
Novice
Joined: 02 May 2005 Posts: 15 Location: Pittsburgh, PA
|
That's another question, and we're new at this.
I don't suppose there's a way to suspend a message flow process (like "sleep') for a predetermined amount of time without halting everything in the broker. I guess it depends if an execution group is single threaded.
By the way, thanks for you time an consideration. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jul 26, 2006 11:52 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
In v6, you can use a timeout node.
In all versions of WMB you can get-disable a flow. This will prevent new messages from starting the flow.
Here's the thing to really think about.
If the downstream process is not handling traffic fast enough.. and you pause the process immediately upstream for a while, then traffic will pile up on at that upstream process from all the processes upstream of that.
So all you are doing is changing where work is piling up.
And, when you restart the upstream process, it will immediately start to flood out all the messages it can at it's fastest rate.
Likely this will also immediately cause the downstream process to have more work than it can handle, and so you'll have to "pause" again! _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wschutz |
Posted: Wed Jul 26, 2006 11:53 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jul 26, 2006 12:03 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
wschutz wrote: |
If its Broker V6, you can use Timer nodes.... |
 _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
bbburson |
Posted: Wed Jul 26, 2006 12:42 pm Post subject: |
|
|
Partisan
Joined: 06 Jan 2004 Posts: 378 Location: Nowhere near a queue manager
|
albitkw wrote: |
Without knowing all the detals, there's some concern that too many messages at one time can overload a subsequent process. |
I would think a better way to handle that concern would be to run (or trigger) multiple instances of the downstream process to handle the busy times. |
|
Back to top |
|
 |
|