ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Retry logic in a flow exposed as Web Service

Post new topic  Reply to topic
 Retry logic in a flow exposed as Web Service « View previous topic :: View next topic » 
Author Message
vsr
PostPosted: Fri Apr 06, 2007 7:36 am    Post subject: Retry logic in a flow exposed as Web Service Reply with quote

Centurion

Joined: 04 Apr 2006
Posts: 104

Hi Everyone ,

I am trying to implement retry logic using MB V6.0.2 . My flow design is as follows:
Code:

                                         out
HttpInput ---->Compute1---->HttpRequest|-------->   Compute2     ---->HttpReply
                                       |-------->   ErrorHandler
                                        (error/       Subflow
                                         catch)


Domain is 'XMLNS' for both HttpInput and HttpRequest nodes .

I want to retry say 5times if first attempt fails in the error handling subflow .

I know I can use MQ backout queues using backout count if my input is MQInput . But here we are exposing flow as a webservice ...

I tried 2 ways :

In both methods I throw an error in the Error Handler if the Retry_count ( which is stored as Environment Variable and incremented for every retry ) is less than 5 .

1. Make use of HttpInput's catch terminal :
-----> Wired catch terminal to HttpRequest node .

2. Placed a Try-Catch terminal after Compute1 before HttpRequest .
-----> wired Catch terminal to Error Handler sub flow where i throw error .

But in both methods , when the message is sent back second time to input node ( HttpInput ) , then the message is being discarded ...

So , I wired the catch terminal of the TryCatch node to TryCatch 'IN' terminal .. so , as of now , flow is working for number of retrys i specified .

But , i am not sure whether this is the correct design !

Please advice me !
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Sat Apr 07, 2007 1:32 am    Post subject: Re: Retry logic in a flow exposed as Web Service Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

In similar scenario I wired error handling subflow out terminal to HTTPRequest input terminal.

In my error handling subflow I make all require checking and error processing.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
elvis_gn
PostPosted: Sat Apr 07, 2007 5:32 am    Post subject: Re: Retry logic in a flow exposed as Web Service Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi vsr,

vsr wrote:
2. Placed a Try-Catch terminal after Compute1 before HttpRequest .
-----> wired Catch terminal to Error Handler sub flow where i throw error .

But in both methods , when the message is sent back second time to input node ( HttpInput ) , then the message is being discarded ...
The reason why the message was being discarded was that you threw from the Error Handler and it was being caught at the try catch node, the TryCatch was connected to the ErrorHandler again....in this loop you incremented the counter to 5 and exited the flow....

Now, I guess you you found a work around, or should be able to change accordingly from the above....

The only concern I have is that you are possibly going to spend 25seconds to reply to a service call...its a long time....

Regards.
Back to top
View user's profile Send private message Send e-mail
vsr
PostPosted: Mon Apr 09, 2007 5:15 am    Post subject: Re: Retry logic in a flow exposed as Web Service Reply with quote

Centurion

Joined: 04 Apr 2006
Posts: 104

elvis_gn wrote:

The only concern I have is that you are possibly going to spend 25seconds to reply to a service call...its a long time....
Regards.


Thank you for the reply Elvis . You are right ! As of now I set Request timeout to 2 seconds . So , if the webservice is down , for 5 retrys it takes 10 sec which is not desired for the request application ..

I wanted to make sure that if the request application can wait for late reply ( 10 sec ) then I should be in a position to make 5 retrys . So I was playing with the retrys in case ...

Thanks all !
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Retry logic in a flow exposed as Web Service
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.