Author |
Message
|
Harshalw |
Posted: Tue Jul 20, 2010 1:04 am Post subject: Triggering more than a application using a queue |
|
|
Voyager
Joined: 23 Jul 2008 Posts: 77
|
Hi , How can i trigger more than one application using one queue ?
Scenario is - A client of mine will send request to 3 different applications and will receive data from all the three application. we can create 3 different connection for that , however i thought to use just a single connection for 3 application. Kindly help me out if it has any risks and how to do that. I am using AIX 6 and MQ 5. |
|
Back to top |
|
 |
zpat |
Posted: Tue Jul 20, 2010 1:23 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
I hope you meant AIX 5 and MQ 6 !
Only one trigger message is generated.
Bear in mind triggering is not really suited to very high volume applications which should have a continously running program listening to the queue (MQGET with MQGMO_WAIT).
Only one application can get a given message from the queue, if you are saying can you contextually invoke different applications on a single queue depending on the message content or origin, then definitely not with base MQ. |
|
Back to top |
|
 |
Harshalw |
Posted: Tue Jul 20, 2010 1:47 am Post subject: |
|
|
Voyager
Joined: 23 Jul 2008 Posts: 77
|
thanks jedi for the response. Here only a request msg will be send on to the queue , which can be same of all the 3 application.
How about this approach?
-- if the start of the applications are included in a script, and that script is triggered by the queue.
Have a doubt here - will the application execute one after another , or they will execute simultaneously. |
|
Back to top |
|
 |
zpat |
Posted: Tue Jul 20, 2010 2:41 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Which one will consume the message?
Order of execution depends on the script logic. |
|
Back to top |
|
 |
Harshalw |
Posted: Tue Jul 20, 2010 2:47 am Post subject: |
|
|
Voyager
Joined: 23 Jul 2008 Posts: 77
|
I just need application triggered , message is not important . DO you see any risk in using this way. or else i will have create 3 different connection for 3 application |
|
Back to top |
|
 |
zpat |
Posted: Tue Jul 20, 2010 2:53 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
The message is important, what is going to remove it from the queue? |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jul 20, 2010 4:07 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Harshalw wrote: |
I just need application triggered , message is not important . DO you see any risk in using this way. or else i will have create 3 different connection for 3 application |
The key risk is if you manage to start 3 applications one of them will read the arriving message (which caused the trigger), the other 2 will therefore have no input data. Unless all 3 applications only browse the message in which event a) you'll need to trigger a 4th application at some later point to clear the queue down & b) your design is rather dubious & could stand some rework!
(I believe it's this issue to which my associate was aluding).
If you need to trigger 3 applications use 3 messages. Pub/sub is the model that immediately springs to mind. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Jul 20, 2010 4:45 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Please don't use MQ Triggering as a general purpose job scheduler. |
|
Back to top |
|
 |
|