user1912657
user1912657

Reputation: 189

Read files in sequence with MULE

I'm using a File Inbound Endpoint in Mule to process files from one directory and after processing move the files to another directory. The problem I have is that sometimes there's a lot of files in the "incoming directory" and when MULE starts up it tries to process them concurrently. This is no good for the DB accessed and updated in the flow. Can the files be read in sequence, no matter what order?

Upvotes: 1

Views: 1316

Answers (1)

David Dossot
David Dossot

Reputation: 33413

Set the flow processing strategy to synchronous to ensure the file poller thread gets mobilized across the flow.

<flow name="filePoller" processingStrategy="synchronous">

On top of that, do not use any <async> block or one-way endpoint downstream in the flow, otherwise, another thread pool will kick in, leading to potential (and undesired for your use case) parallel processing.

Upvotes: 2

Related Questions