Hi Shafreen, This is a very useful feature. We'll review and merge the PR.
Thanks. Regards On Sat, Mar 28, 2020 at 10:23 PM shafreen anfar <anfar.shafr...@gmail.com> wrote: > Hi All, > > At the moment, current MFP implementation does not support retrying based > on HTTP status codes. It only supports retrying for transport level > failures but not for application level failures. As you know, in HTTP > protocol, application level failures are distinguished using different > status codes. In the case of MFP, it is important to be able to retry for > 5xx server errors. But there also could be rare occasions in which retrying > for 4xx and 3xx are useful. Especially when dealing with servers that do > not follow HTTP protocol exactly as it is. > > Therefore, I have improved MFP implementation to support retrying based on > the returned HTTP status code as well. Say, a user wants to retry for HTTP > status codes 500 and 504 but not for any other HTTP status code. In that > case user can configure the MFP as below. Please note the parameter in bold > font which I have introduced along with this feature. > > <messageProcessor xmlns="http://ws.apache.org/ns/synapse" > > class="org.apache.synapse.message.processors.forward.ScheduledMessageForwardingProcessor" > name="Processor2" > messageStore="JMSMS"> > <parameter name="max.delivery.attempts">4</parameter> > <parameter > name="message.processor.reply.sequence">replySequence</parameter> > <parameter name="interval">1000</parameter> > *<parameter name="retry.http.status.codes">500, 504</parameter>* > </messageProcessor> > > Please not that the above parameter does not come to effect in case of > out-only. Implementation of this feature can be found in [1]. Once this is > merged, I am planning to send another PR for the required documentation > changes. > > [1] https://github.com/apache/synapse/pull/32 > > Thanks, > Shafreen > -- *Isuru Udana* Associate Director/Architect *; WSO2 Inc.; http://wso2.com <http://wso2.com>email: isud...@gmail.com <isud...@gmail.com> *