Skip to content

Instantly share code, notes, and snippets.

@vanjikumaran
Created July 31, 2013 07:49
Show Gist options
  • Save vanjikumaran/6120133 to your computer and use it in GitHub Desktop.
Save vanjikumaran/6120133 to your computer and use it in GitHub Desktop.
SynapseRetry2
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://ws.apache.org/ns/synapse">
<sequence name="errorHandler">
<log level="custom">
<property name="MESSAGE" value="Executing default &#34;fault&#34; sequence"/>
<property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
<property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
</log>
<makefault response="true">
<code xmlns:tns="http://www.w3.org/2003/05/soap-envelope" value="tns:Receiver"/>
<reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/>
</makefault>
<send/>
</sequence>
<sequence name="fault">
<log level="full">
<property name="MESSAGE" value="Executing default &#34;fault&#34; sequence"/>
<property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
<property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
</log>
<drop/>
</sequence>
<sequence name="main" onError="errorHandler">
<in>
<send>
<endpoint>
<loadbalance algorithm="org.apache.synapse.endpoints.algorithms.RoundRobin">
<endpoint>
<address uri="http://localhost:9001/services/LBService1">
<retryConfig>
<disabledErrorCodes>101503</disabledErrorCodes>
</retryConfig>
</address>
</endpoint>
<endpoint>
<address uri="http://localhost:9002/services/LBService1">
<retryConfig>
<enabledErrorCodes>101503</enabledErrorCodes>
</retryConfig>
</address>
</endpoint>
<endpoint>
<address uri="http://localhost:9003/services/LBService1">
<enableAddressing/>
<suspendOnFailure>
<initialDuration>60000</initialDuration>
<progressionFactor>1.0</progressionFactor>
</suspendOnFailure>
</address>
</endpoint>
</loadbalance>
</endpoint>
</send>
<drop/>
</in>
<out>
<send/>
</out>
</sequence>
</definitions>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment