Author |
Message
|
mcfennek |
Posted: Wed Nov 24, 2004 4:56 am Post subject: Query NumberOfMessages from Message Broker |
|
|
Newbie
Joined: 31 Oct 2004 Posts: 8
|
Hallo,
I need to write a program, which scans a queue and starts a process if the queue is getting too full. The idea behind this is: if the system which I provide messages to is too slow, I want to fetch all messages and transfer those as a file.
One possiblity would be to start an event monitoring process in Java which provides this functionality.
Another idea would be a WBIMB Messages Flow which only gets started if the number of messages in a queue reaches a certain limit.
Is something like this possible? How would I configure the InputNode? Or would I have to write a custom InputNode?
thanks for your help,
Michael |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Nov 24, 2004 5:07 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I wouldn't use WMQI for this. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mcfennek |
Posted: Wed Nov 24, 2004 6:40 am Post subject: |
|
|
Newbie
Joined: 31 Oct 2004 Posts: 8
|
Why wouldn't you use WMQI for this? We have a broker running anyways, so why shouldn't we use it for this task as well? |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Nov 24, 2004 7:10 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Because the MQInput node really prefers to keep a queue open for input and in a Get/Wait state. And I prefer not to have applications sharing queues.
This problem is generally better solved by enabling QDEPTH HIGH events, setting the properties of the queue properly, and monitoring the event queue for the event, and then launching a particular process.
Now, okay, you could use WMQI for monitoring the event queue. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
KeeferG |
Posted: Wed Nov 24, 2004 7:49 am Post subject: |
|
|
 Master
Joined: 15 Oct 2004 Posts: 215 Location: Basingstoke, UK
|
I was thinking you could use a trigger but then realised that the queue is in constant use to that wouldnt work.
A QDEPTH HIGH event would be one way to start off your message flow. You would need to write a custom node to clear the queue. There was an MQGet node around for a while. Im not sure what happened to it though.
Would the existing application that was servicing this queue still be running whilst you clear the queue or would you be stopping this. I mean if you are constantly loading the queue faster than it is being serviced then this process may be repeatedly being run.
Would it not be better to make the servicing application run faster so that the situation doesnt arise. ie mutliple instances etc. as your solution seems a workaround to a problem. Better to fix the problem surely. _________________ Keith Guttridge
-----------------
Using MQ since 1995 |
|
Back to top |
|
 |
mcfennek |
Posted: Tue Nov 30, 2004 6:39 am Post subject: |
|
|
Newbie
Joined: 31 Oct 2004 Posts: 8
|
it seems that our requirements have changed a little bit. now it seems like I get a trigger from the system if they want the current messages transfered as a file.
So I don't have to look for an MQ event anymore, but on request I just have to fetch the current number of messages, put those in a file and transfer the file per ftp or email to the subsystem. Possibly I could just start an execution group with a specific messages-to-file flow on request. While I'm doing this, there will be nobody else listening to the queue, so it should be pretty staight forward.
anyways, if anybody knows where I can find this MQGet node, I would appreciate it. |
|
Back to top |
|
 |
Lisa |
Posted: Tue Nov 30, 2004 9:43 am Post subject: MQget Node |
|
|
Master
Joined: 07 Jun 2002 Posts: 287 Location: NJ
|
Look at IBM SupportPac website. |
|
Back to top |
|
 |
EddieA |
Posted: Tue Nov 30, 2004 12:37 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
You'll find it in the "Withdrawn" section. And if you're on v5, search this site for hints and tips on how to implement it.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
|