Author |
Message
|
preetipadma |
Posted: Fri Apr 28, 2006 12:02 am Post subject: Defining Triggers on Queues |
|
|
Novice
Joined: 05 Apr 2006 Posts: 22
|
Hi All,
I am working On windows.
I have defined a local queue Q1 and activated the Triggering Control on it.
The Trigger is supposed to fire on 'Every Message' and call a process 'P1' which is defined and it calls a batch script which creates a directory 'D1'.
Now my Initiation Q is 'SYSTEM.CHANNEL.INITQ.
I want to know whether this is the correct Initiation Q?
Coz I am getting an Error as below
----- amqrcoba.c : 1187 -------------------------------------------------------
4/28/2006 13:10:12 - Process(4088.1) User(xxxx) Program(runmqchi.exe)
AMQ9519: Channel 'E:\MQSeries\TrgProc.' not found.
EXPLANATION:
The requested operation failed because the program could not find a definition
of channel 'E:\MQSeries\TrgProc.'.
ACTION:
Check that the name is specified correctly and the channel definition is
available.
----- amqrcoba.c : 1187 -------------------------------------------------------
If the Initiation Queue is ok then what is my Problem?
I had also tried with SYSTEM.DEFAULT.INITIATION.QUEUE.
Why my Batching Prgrom is not getting executed? |
|
Back to top |
|
 |
Mr Butcher |
Posted: Fri Apr 28, 2006 12:33 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
no. the system.channel.initq is only for the channel initiator if you want to start channels automatically by triggering the xmitq. dont use it for application triggering.
define your own initiation queue (a qlocal) and start a trigger monitor for it, change the definition of the queue that is triggered and you should be fine. _________________ Regards, Butcher |
|
Back to top |
|
 |
kevinf2349 |
Posted: Fri Apr 28, 2006 5:08 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
Quote: |
The Trigger is supposed to fire on 'Every Message' |
Hack, spit...bad, bad, bad!
I have yet to find a truly good reason to use trigger type of EVERY and most times I have seen it used has been because of lazy/bad application design. Why do you need the application triggered every time a message hits? How are you designing the flow to handle unexpected message flooding?
<added later> But I am open to listening as to what is a good use of EVERY  |
|
Back to top |
|
 |
preetipadma |
Posted: Fri Apr 28, 2006 5:27 am Post subject: Defining Triggers on Queues |
|
|
Novice
Joined: 05 Apr 2006 Posts: 22
|
HMMM..
I was unaware of this Fact !!!
But If I want to catch execptions every time it occurs and do not want to delete the error as the administrator needs to see it and rectify it, Using 'First' will not help me, neither will 'Depth'.
The scenario is basically to trap exceptions in this queue and trigger a process which notifies the Administrator that something is wrong.
If you can suggest how I can attain my objective without using 'Every', it will be helpful ...
Thanks in Advance |
|
Back to top |
|
 |
vennela |
Posted: Fri Apr 28, 2006 6:17 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
You should use First and your program should loop through the messages in the queue until it drains off the queue. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Apr 28, 2006 1:31 pm Post subject: Re: Defining Triggers on Queues |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
preetipadma wrote: |
HMMM..
I was unaware of this Fact !!!
But If I want to catch execptions every time it occurs and do not want to delete the error as the administrator needs to see it and rectify it, Using 'First' will not help me, neither will 'Depth'.
The scenario is basically to trap exceptions in this queue and trigger a process which notifies the Administrator that something is wrong.
If you can suggest how I can attain my objective without using 'Every', it will be helpful ...
Thanks in Advance |
If you want to keep processing see Vennela's post.
Bad messages need then to be "processed" i.e. moved to a bad message queue and you need to have that one monitored to get alerted.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|