how to achieve retry mechanism for ftp outbound end point using vm transaction?

259 views Asked by At

We have tried like using vm as outbound in flow1 and inbound in flow2. In flow2 we are using FTP as outbound end point and we have enabled the vm transaction even then also its not working. Do we need to enable transaction for retrying? As per below question we tried using transaction how to make until successful as synchronous to retry mechanism for FTP Outbound in mule 3.4.2 could you please help me out in resolving this issue??

<flow name="FTPFlow1" doc:name="FTPFlow1">
            <set-payload doc:name="Set Payload" value="#[payload]"/>
            <vm:outbound-endpoint exchange-pattern="one-way"  doc:name="VM" path="doProcess">
                <vm:transaction action="ALWAYS_BEGIN"/>
            </vm:outbound-endpoint>
        </flow> 
        <flow name="FTPFlow2" doc:name="FTPFlow2">
            <vm:inbound-endpoint exchange-pattern="one-way" path="doProcessMessage" doc:name="VM">
                <vm:transaction action="JOIN_IF_POSSIBLE"/>
            </vm:inbound-endpoint>
            <ftp:outbound-endpoint host="localhost" port="21" path="/data/mule/ftp" user="admin" password="admin" responseTimeout="10000" doc:name="FTP"/>
        </flow>
1

There are 1 answers

0
David Dossot On BEST ANSWER

You've got the transactions wrong: the VM outbound doesn't need to be transacted, it's the VM inbound that needs to in order to trigger redeliveries in case of FTP failures.

<flow name="FTPFlow1" doc:name="FTPFlow1">
    <set-payload doc:name="Set Payload" value="#[payload]"/>
    <vm:outbound-endpoint exchange-pattern="one-way"  doc:name="VM" path="doProcess" />
</flow> 
<flow name="FTPFlow2" doc:name="FTPFlow2">
    <vm:inbound-endpoint exchange-pattern="one-way" path="doProcessMessage" doc:name="VM">
        <vm:transaction action="ALWAYS_BEGIN"/>
    </vm:inbound-endpoint>
    <ftp:outbound-endpoint host="localhost" port="21" path="/data/mule/ftp" user="admin" password="admin" responseTimeout="10000" doc:name="FTP"/>
</flow>