Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mule - Retry connection with basic flow

I have a basic mule flow:

HTTP => SOAP => JAVA CLASS

<mule xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
    xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd">
    <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
    <flow name="test_dynamicsFlow">
        <http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
        <cxf:jaxws-service doc:name="CXF"/>
        <component doc:name="Java"/>
    </flow>
</mule>

I would like to make a retrying connection to SOAP with timeout but I don't know if it possible.

I've been looking for error handling connectors:

enter image description here

Should I use these connectors to do that or how can I implement it?

like image 961
user1911 Avatar asked Nov 19 '25 06:11

user1911


1 Answers

You need to wrap your HTTP call with the until-successful scope.

Example:

<until-successful objectStore-ref="objectStore" maxRetries="5" secondsBetweenRetries="60" >
    <http:request config-ref="HTTP_Request_Configuration" path="submit" method="POST" />
</until-successful>

Reference: https://developer.mulesoft.com/docs/display/current/Until+Successful+Scope

like image 57
David Dossot Avatar answered Nov 21 '25 21:11

David Dossot



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!