Running Flows in Mule Parallel -


i have 2 flows in mule want run in parallel. first flow should transfer file remote machine using sftp local directory (does none stop long file updated in remote directory). second flow must take data in file @ update/insert them database invoking pentaho kettle transformation/job (also continuous process long files keep coming in). however, when run flow, somehow passing first flow , tries perform second flow. how can fix this? here mule flow:

<flow name="flow1">   <sftp:inbound-endpoint     address="sftp://username:password@ip_ddress:22/path"     responsetimeout="1000" />   <echo-component />   <file:outbound-endpoint path="/path/to/outputfolder"      responsetimeout="10000"/> </flow>  <flow name="flow2">    <custom-transformer class="org.transformation.kettle.invokemain" />  </flow>  

your second flow should have file:outbound-endpoint pick file dropped first flow:

<flow name="flow1">   <sftp:inbound-endpoint       address="sftp://username:password@ip_ddress:22/path"       responsetimeout="1000" />   <logger level="info"       message="#[message.payloadas(java.lang.string)]" />   <file:outbound-endpoint path="/path/to/outputfolder" /> </flow>  <flow name="flow2">    <file:inbound-endpoint path="/path/to/outputfolder"       fileage="10000" />   <custom-transformer class="org.transformation.kettle.invokemain" />  </flow> 

notice i've:

  • replaced super old <echo-component /> more modern logger. log message payload, think intention?
  • dropped useless responsetimeout="10000" file:outbound-endpoint,
  • set fileage of 10 seconds on inbound file endpoint prevent picking file still written sftp inbound endpoint. tune value if big or small.

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -