Below is my file inbound endpoint configuration. It is processing all .edi files available at the specified path.
<file:inbound-endpoint path="D:\test docs\in"
pollingFrequency="3000" responseTimeout="10000" doc:name="Incoming File">
<file:filename-regex-filter pattern="(.*).edi"
caseSensitive="false" />
I send an event to this endpoint from spring application as below
muleClient.dispatch("file://D:/test docs/in", inputFileName,
null);
I am passing the input file name as message1.edi. I want to restrict file inbound point to process single file whose name is sent as payload object in dispatch().
Is it possible with file inbound endpoint?
Muleclient.dispatch() is an async method. I want to pause the current thread till i get reply from dispatch(). As of now i am using thread.sleep(). Is there any better approach?