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 » Resend Request

Post new topic  Reply to topic
 Resend Request « View previous topic :: View next topic » 
Author Message
nishantmodak
PostPosted: Fri Jun 05, 2009 8:39 am    Post subject: Resend Request Reply with quote

Novice

Joined: 25 May 2009
Posts: 19

If I get a Failure on a HTTP Request node (while invoking a webservice), I need to resend the request to the webservice.

Is there a way I can configure the retry ?

Thanks
Back to top
View user's profile Send private message
broker_new
PostPosted: Fri Jun 05, 2009 9:57 am    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

Whenever a web service call fails, the message will be propagated to the Failure terminal, wire a compute node to it and create an environment variable to maintain the retry count.

HTTP Failure Terminal>>Compute>>Input Terminal of HTTP Request
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jun 05, 2009 10:01 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

broker_new wrote:
Whenever a web service call fails, the message will be propagated to the Failure terminal, wire a compute node to it and create an environment variable to maintain the retry count.

HTTP Failure Terminal>>Compute>>Input Terminal of HTTP Request

And then watch your EG fall down because of the infinite loop you just wired up.

Never use node connections to create a loop. Always use PROPAGATE, or Try/Catch
Back to top
View user's profile Send private message
broker_new
PostPosted: Fri Jun 05, 2009 11:39 am    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

correct, forgot to post that i am using the propagate in the compute node..when the retry count >5...... propagate to terminal out1 which will go to an error queue;
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jun 05, 2009 12:02 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

broker_new wrote:
correct, forgot to post that i am using the propagate in the compute node..when the retry count >5...... propagate to terminal out1 which will go to an error queue;


The PROPAGATE would need to be *before* the HTTPRequest node, and not connected to from anything *after* it.

Compute->Try/Catch--Try-->HttpRequest
--Catch-->DifferentComputeThatLogsTheErrorAndExits
Back to top
View user's profile Send private message
broker_new
PostPosted: Tue Jun 09, 2009 11:26 am    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

What are the things that need to be considered for not wiring the failure terminal to the input terminal, its working good, i haven't found any spikes in CPU nor the memory, working perfectly in production.
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
dmw1986
PostPosted: Wed Jun 10, 2009 7:18 am    Post subject: Reply with quote

Apprentice

Joined: 24 Sep 2008
Posts: 35

broker_new wrote:
Whenever a web service call fails, the message will be propagated to the Failure terminal, wire a compute node to it and create an environment variable to maintain the retry count.

HTTP Failure Terminal>>Compute>>Input Terminal of HTTP Request


Can you post your ESQL?
Back to top
View user's profile Send private message
broker_new
PostPosted: Wed Jun 10, 2009 7:33 am    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

(WMB 6.0.3)

HTTP Failure Terminal>>Compute (out1)>>Input Terminal of HTTP Request
Compute (out2)>>MQOutput (Error Queue)


DECLARE tns NAMESPACE 'http://www.staples.com/orderentry';
DECLARE soapEnv NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';

SET Environment.RetryCount = CAST(Environment.RetryCount AS INTEGER) +1;

IF(Environment.RetryCount <= 5) THEN
SET OutputRoot.HTTPRequestHeader= Environment.HTTPHeader;
SET OutputRoot.XMLNS = Environment.XMLNS;
PROPAGATE TO TERMINAL 'out1';
ELSE
SET OutputRoot.MQMD = Environment.MQMD;
SET OutputRoot.XMLNS = Environment.XMLNS;
PROPAGATE TO TERMINAL 'out2';
END IF;
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
dmw1986
PostPosted: Wed Jun 10, 2009 7:45 am    Post subject: Reply with quote

Apprentice

Joined: 24 Sep 2008
Posts: 35

Thanks, Is there a way you can do SOAPFailure > Compute > InputSoap

But in the compute say retry every 5 minutes? Will the TimeoutNotification Node work for this?
Back to top
View user's profile Send private message
AkankshA
PostPosted: Thu Jun 11, 2009 8:07 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

you can use the same logic of retrying in eSQL itself....

just that u should always avoid creating loops in message flow.... and have a good mechanism of exception handling....
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Resend Request
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.