Author |
Message
|
Deepak_reddy |
Posted: Tue Mar 13, 2007 9:15 pm Post subject: Routing Multiple Messages to Multiple Destinations |
|
|
Novice
Joined: 04 Sep 2006 Posts: 10
|
Hi,
I want to send multiple messages created out of a single message to multiple destinations. I am using
PROPAGATE TO TERMINAL 'out' DELETE NONE;
to send messages to respective destinations. But if one of the destination does not exist in that case the messages could not be routed to the other destinations following that one.
Any suggestion...... Thanks in advance |
|
Back to top |
|
 |
au@kosa |
Posted: Tue Mar 13, 2007 9:36 pm Post subject: |
|
|
 Centurion
Joined: 04 Jan 2007 Posts: 103 Location: pune
|
i suggest you to put the routing mechanism (inside C.N node) after try catch node, throw the user defined exception, catch it and then propagate the message for the rest of the destinations. _________________ Regards,
au@kosa
IBM Certified SOA Solution Designer/Associate |
|
Back to top |
|
 |
elvis_gn |
Posted: Tue Mar 13, 2007 10:14 pm Post subject: Re: Routing Multiple Messages to Multiple Destinations |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi Deepak_reddy,
Deepak_reddy wrote: |
I want to send multiple messages created out of a single message to multiple destinations. |
Do u mean multiple queue destinations or Label destinations ? If queue destinations, then use the DestinationList.
Regards. |
|
Back to top |
|
 |
sarat |
Posted: Tue Mar 13, 2007 10:38 pm Post subject: |
|
|
 Centurion
Joined: 29 Jun 2005 Posts: 136 Location: India
|
Hi,
you can use
1) Destination List
2) Route to Label
3) Compute node terminals using PROPAGATE statement. _________________ With Regards,
Sarat. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Mar 14, 2007 1:56 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
And finally you can use PUB/SUB for this as well....
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Deepak_reddy |
Posted: Wed Mar 14, 2007 11:13 pm Post subject: |
|
|
Novice
Joined: 04 Sep 2006 Posts: 10
|
I tried with TryCatch node and it is working.
Thanks a lot. |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Wed Mar 14, 2007 11:59 pm Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
Deepak_reddy wrote: |
I tried with TryCatch node and it is working.
Thanks a lot. |
TryCatch to generate multiple messages to multiple destinations ?
I don't get it.
What did you try to do ?
Marcin |
|
Back to top |
|
 |
Deepak_reddy |
Posted: Thu Mar 15, 2007 3:07 am Post subject: |
|
|
Novice
Joined: 04 Sep 2006 Posts: 10
|
marcin.kasinski wrote: |
Deepak_reddy wrote: |
I tried with TryCatch node and it is working.
Thanks a lot. |
TryCatch to generate multiple messages to multiple destinations ?
I don't get it.
What did you try to do ?
Marcin |
Well, I will explain the scenario.
I have to route different messages created out of a single message to different destinations. Suppose i have to route 5 messages to 5 differnet queues. But the 3rd message could not be delivered to the queue as it does not exists. In that case 4th and 5th message could not be send to their respective destinations as i have not catch the exception. By using TryCatch node i am able to sent the failed message to a default queue and allow other message to reach their destination.
Hope this clears what i want to do.
Thanks |
|
Back to top |
|
 |
sunny_30 |
Posted: Thu Mar 15, 2007 6:58 am Post subject: |
|
|
 Master
Joined: 03 Oct 2005 Posts: 258
|
Hi Deepak,
I suggest you use the SQL-handlers for this.
When you have a problem with one of the Destinations, you 'handle' (not catch!) that put-error and continue processing for the other destinations.
Your ESQL shd look something like below:
BEGIN
DECLARE EXIT HANDLER FOR SQLSTATE LIKE '%
BEGIN (when there is an error while propagating)
--Store the SQL error codes here in the Environment.
--You can also LOG the event.
PROPAGATE to TERMINAL 1 DELETE NONE;
--In the flow connected to this Terminal, you handle the failed scenario in whatever way you want
END;
PROPAGATE TO TERMINAL 'out' DELETE NONE;
END;
Read more abt handlers on how they work and implement them here.
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ac17140_.htm
-SUnny. |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Thu Mar 15, 2007 7:08 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
I would suggest to use for it Destination List, PROPAGATE and Dead Letter Handler for "problem messages". _________________ Marcin |
|
Back to top |
|
 |
sunny_30 |
Posted: Thu Mar 15, 2007 11:59 am Post subject: |
|
|
 Master
Joined: 03 Oct 2005 Posts: 258
|
Hi Marcin,
Deepak used 'propagate' to generate multiple-messages.
And along with it, he used 'DestinationList' to send it to multiple-destinations. His problem was not how to handle the failed messages.
His problem was how to handle the remaining destinations:
Out of the many propagates he do, if any single propagate fails to any of the Destinations, he has to continue processing rather than getting the flow stopped. He addressed this problem by 'catching' the propagation error & continuing to propagate the messages to the rest of the destinations using the flow connected via the catch terminal.
Hope I am right in my explanation.
-Sunny |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Thu Mar 15, 2007 12:06 pm Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
sunny_30 wrote: |
Hi Marcin,
Deepak used 'propagate' to generate multiple-messages.
And along with it, he used 'DestinationList' to send it to multiple-destinations. His problem was not how to handle the failed messages.
His problem was how to handle the remaining destinations:
Out of the many propagates he do, if any single propagate fails to any of the Destinations, he has to continue processing rather than getting the flow stopped. He addressed this problem by 'catching' the propagation error & continuing to propagate the messages to the rest of the destinations using the flow connected via the catch terminal.
Hope I am right in my explanation.
-Sunny |
OK. I see... I Hope  _________________ Marcin |
|
Back to top |
|
 |
|