Author |
Message
|
ucbus1 |
Posted: Thu Sep 02, 2004 10:51 am Post subject: Trigger question |
|
|
Knight
Joined: 30 Jan 2002 Posts: 560
|
I have a local queue manager LOCALQM and two local queues LOCAL1 and LOCAL2. I have sent up LOCAL2 to be the initiation queue and LOCAL1 to be application queue. The trigger type is "DEPTH" Trigger depth is 10. I run the trigger monitor from command line runmqtrm -qLOCALQM -qLOCAL2. It works fine and triggers when the messages in the queue are 9 ( trigger depth -1). This is fine. But once triggered, the trigger control is becoming OFF.
My idea how this DEPTH trigger should be working is, iff the message count in LOCAL1 becomes 9 it should kick the trigger. The trigger should be off immediately. Now If I delete 3 messages and the count becomes 6.The trigger should be ON. Now if I add 3 messages back then it should kick of another tigger event. Right?
Please let me know |
|
Back to top |
|
 |
vennela |
Posted: Thu Sep 02, 2004 10:53 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
For triggering on QDEPTH, it is the duty of the application to turn the TRIGGER to ON. You should be looking more into the manuals.
It is working as designed
Straight from the manual:
Quote: |
With triggering by depth, the queue manager disables triggering (using the TriggerControl attribute) after it creates a trigger message. Your application must re-enable triggering itself (by using the MQSET call) after this has happened.
|
|
|
Back to top |
|
 |
ucbus1 |
Posted: Thu Sep 02, 2004 11:02 am Post subject: |
|
|
Knight
Joined: 30 Jan 2002 Posts: 560
|
hmmm.
this is what I need to do,
I need to send an e-mail when ever the messages in the queue becomes say 9. I want to to keep the process simple by keeping a trigger to check if I can send the e-mail. Now if the rigger is going to be OFF immediately after sending, I guess I may not be able to do this.
Writing a program to monitor the queue continuously is a overkill. Is there any easy solution??
Please do not suggest to purchase qpasa or some other tool
Thanks |
|
Back to top |
|
 |
vennela |
Posted: Thu Sep 02, 2004 11:11 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
You can use the performance events to do that.
You can setup event messages based on QDEPTHHI or QDEPTHLOW
Look at the event monitoring manual. Look at performance events |
|
Back to top |
|
 |
EddieA |
Posted: Thu Sep 02, 2004 12:49 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
QDEPTHHI and QDEPTHLOW work on percentages, not number of messages.
Also, if you plan to use these, read the relevent sections in the PCF manual. Have a break, and then read them again. Theses events do not work like you would think.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Sep 02, 2004 4:05 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Quote: |
The trigger type is "DEPTH" Trigger depth is 10. I run the trigger monitor from command line runmqtrm -qLOCALQM -qLOCAL2. It works fine and triggers when the messages in the queue are 9 ( trigger depth -1). This is fine.
|
It is? If I had a queue triggered at 10, and it went off at 9, I wouldn't think that is fine. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
ucbus1 |
Posted: Tue Sep 07, 2004 1:17 pm Post subject: |
|
|
Knight
Joined: 30 Jan 2002 Posts: 560
|
Peter,
My bad. I had a queue triggered at 10, and it went off at 10.
All,
I set up the performance events as suggested by Venny . Read the PCF manual and the examples.
The event messages I am getting in SYSTEM.ADMIN.PERFM.EVENTare in HEX format. I tried to read the content of the message and I could not as the radio button for the TEXT box is disabled.
If I am correct this has to do with the way message is put into the queue. Since the messages in SYSTEM.ADMIN.PERFM.EVENT put by MQseries what needs to be changed to make sure that the I can read them in textformat.
Thanks |
|
Back to top |
|
 |
EddieA |
Posted: Tue Sep 07, 2004 1:55 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
The event messages I am getting in SYSTEM.ADMIN.PERFM.EVENTare in HEX format |
Correct.
Quote: |
I can read them in textformat |
You can't. They are "Event" messages in the format described in the Event Monitoring manual. This will be: an Event Header, followed by one, or more, Event Data blocks.
Sorry if I mislead you with my earlier comment about the PCF manual.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
ucbus1 |
Posted: Wed Sep 08, 2004 4:22 am Post subject: |
|
|
Knight
Joined: 30 Jan 2002 Posts: 560
|
Thanks EddieA,
I should be able to write a program to read the messages. Right? If these are in HEX format what options on my GET need to be set to read these messages so that I can show the message in TXT format?
Thanks |
|
Back to top |
|
 |
Nigelg |
Posted: Wed Sep 08, 2004 5:20 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
The messages cannot be read in TXT format. The data in the msg is contained in a number of structures, e.g. MQCFH, MQCFIN, MQCFST, MQCFIL, MQCFSL, described in the WMQ PCF manual. You have to write a program to read these structures from the msg and interpret the data into a readable format. |
|
Back to top |
|
 |
|