我们尝试过使用vm作为flow1中的出站和flow2中的入站。在flow2中,我们使用FTP作为出站端点,我们已启用vm事务,即使这样也无法正常工作。我们是否需要启用交易才能重试?根据以下问题,我们尝试使用交易how to make until successful as synchronous to retry mechanism for FTP Outbound in mule 3.4.2你可以帮我解决这个问题吗?
<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>
答案 0 :(得分:2)
您的交易错误:VM出站不需要进行交易,它是需要的VM入站,以便在FTP出现故障时触发重新发送。
<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>