Discussion:
Recover and restart a failed FTP Endpoint
Muthuraman Muthuraman
2012-01-27 14:29:56 UTC
Permalink
Hi,

I am trying to implement one of our use case to restart a failed flow(eg server crash) which has FTP as inbound endpoint.

If few records were already processed in the previous failed run of the flow, then the restart should pick up the flow from where it was left off in the previous failed run.
For example, say there are 20 records in the file and in the first failed run 5 records were processed. When the server is restarted, the file processing should be started from 6th record.

I would need help in implementing the above said use case in mule.

Please let me know if you need more information.

Thanks,
Muthu.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Pablo La Greca
2012-01-27 16:42:34 UTC
Permalink
I would suggest pre processing the file, create a Collection payload with each record. Then send it through a collection-splitter [1] wth a vm outbound endpoint. You can use a persistent vm endpoint [2]
to avoid lossing records in case that the application must be restarted. Then put another flow consuming each record from the same vm endpoint. So you won't lose any record an will not process any record twice.

Configuration will look like:

<vm:connector name="persistent">
<vm:queue-profile persistent="true" maxOutstandingMessages="500"/>
</vm:connector>

<flow name="recordSplitter">
<file:inbound-endpoint .../>
<custom-processor class="createCollectionWithRecords"/> //This can be a transformer
<collection-splitter/>
<vm:outbound-endpoint path="fileRecord"/>
</flow>

<flow name="recordProcessor">
<vm:inbound-endpoint path="fileRecord"/>
//Do whatever you have to do with each record
</flow>

HTH, Pablo.

[1] http://www.mulesoft.org/documentation/display/MULE3USER/Routing+Message+Processors#RoutingMessageProcessors-CollectionSplitter
[2] http://www.mulesoft.org/documentation/display/MULE3USER/VM+Transport+Reference

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Loading...