Author |
Message
|
manikabedi |
Posted: Wed Mar 17, 2004 9:19 am Post subject: Listener event For MQ |
|
|
Newbie
Joined: 16 Mar 2004 Posts: 3
|
Hi,
Is there a listener event or object for Websphere MQ?
I have a program which is supposed to look into a queue to see any new messages have come. Right now I am running a thread which loops this message queue all the time. But this is eating up my CPU when no messages are coming through.
Is there any event which can tell me a new message has come, like Sonic MQ has a onMessage event which indicates this.
Any help will be appreciated.
Thanks
Manika |
|
Back to top |
|
 |
kman |
Posted: Thu Mar 18, 2004 12:21 am Post subject: |
|
|
Partisan
Joined: 21 Jan 2003 Posts: 309 Location: Kuala Lumpur, Malaysia
|
It depends. You can do triggering. Where the application is only triggered (or got triggered) when there is a message arrival in the queue.
Or if you are using JMS, you can use the onMessage method. |
|
Back to top |
|
 |
gunter |
Posted: Thu Mar 18, 2004 12:36 am Post subject: |
|
|
Partisan
Joined: 21 Jan 2004 Posts: 307 Location: Germany, Frankfurt
|
Loop around a get without wait is generally not a good idea. If you loop with wait( unlimited or with time) the process won't eat all your cpu.
Solving the problem: How break up a loop is discussed in other threads. Search "request response" on this site. _________________ Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3 |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Mar 18, 2004 8:06 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
If you use the JMS, you can set up an onMessage asynchronous listener that will get messages as they arrive. It is similar to triggering. |
|
Back to top |
|
 |
bob_buxton |
Posted: Fri Mar 19, 2004 1:07 am Post subject: |
|
|
 Master
Joined: 23 Aug 2001 Posts: 266 Location: England
|
On some platforms you can use MQGMO_SET_SIGNAL to request asynchronous notification of message arrival. _________________ Bob Buxton
Ex-Websphere MQ Development |
|
Back to top |
|
 |
josh@evare.com |
Posted: Fri Mar 19, 2004 5:13 pm Post subject: |
|
|
Newbie
Joined: 19 Mar 2004 Posts: 1
|
Which platforms does WMGMO_SET_SIGNAL work on? Specifically, does in work in Windows 2000?
The documentation I've read claim it is supported on 32-bit Windows platforms (I figure W2K falls in that bucket). But every time I try to use WMGMO_SET_SIGNAL, all I get is MQRC_OPTIONS_ERROR. |
|
Back to top |
|
 |
bower5932 |
Posted: Fri Mar 19, 2004 8:32 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I believe that 32 bit Windows reference is referring to the MQSeries for Windows 2.1 product. It wasn't quite a full-function MQ. I believe it was also called the leaf-node qmgr? I don't believe the set signal works with the regular Windows platform products. |
|
Back to top |
|
 |
EddieA |
Posted: Sat Mar 20, 2004 10:14 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
This option is supported in the following environments: z/OS, Compaq NonStop Kernel, Windows 95, Windows 98 |
And as Ron stated the Windows is a:
Quote: |
reference is referring to the MQSeries for Windows 2.1 product |
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
|