Hi, We are using the below configuration to send a file from single source to multiple remote destinations.
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> <routeContext id="gcgRatesOutbound" xmlns="http://camel.apache.org/schema/spring"> <route id="gcgRatesFileOut"> <from uri="file:{{nas.root}}/{{gcg.out.prices.dir}}?delay={{poll.delay}}&initialDelay={{initial.delay}}&readLock=rename&scheduledExecutorService=#scheduledExecutorService" /> <multicast stopOnException="true"> <to uri="scp://{{gcg.ste.Client1_User_Name}}@{{gcg.ste.Host_Name}}:{{gcg.ste.Port_Number}}/{{gcg.ste.Destination_Client1}}?knownHostsFile={{ssh.knownHosts}}&privateKeyFile={{ssh.privateKey}}" /> <to uri="scp://{{gcg.ste.Client2_User_Name}}@{{gcg.ste.Host_Name}}:{{gcg.ste.Port_Number}}/{{gcg.ste.Destination_Client2}}?knownHostsFile={{ssh.knownHosts}}&privateKeyFile={{ssh.privateKey}}" /> <to uri="scp://{{gcg.ste.Client3_User_Name}}@{{gcg.ste.Host_Name}}:{{gcg.ste.Port_Number}}/{{gcg.ste.Destination_Client3}}?knownHostsFile={{ssh.knownHosts}}&privateKeyFile={{ssh.privateKey}}" /> </multicast> </route> </routeContext> </beans> Using the above confirguration the file reaches the remote destinations, which confirmed that the connection to all the remote destinations were successfull. We need that the file should be moved to the archive folder after the file has been successfully transfered to all the remote destinations. And should move to error folder incase of any error. However, when I add the archival code (<To> element) as child element to the multicast element in the above configuration and use the <doTry> and the <doCatch> tag to move the file to error folder incase of an error. The file does not reach the remote destinations. <doTry> <multicast stopOnException="true" parallelProcessing="true"> <to uri="scp://{{gcg.ste.Client1_User_Name}}@{{gcg.ste.Host_Name}}:{{gcg.ste.Port_Number}}/{{gcg.ste.Destination_Client1}}?knownHostsFile={{ssh.knownHosts}}&privateKeyFile={{ssh.privateKey}}" /> <to uri="scp://{{gcg.ste.Client2_User_Name}}@{{gcg.ste.Host_Name}}:{{gcg.ste.Port_Number}}/{{gcg.ste.Destination_Client2}}?knownHostsFile={{ssh.knownHosts}}&privateKeyFile={{ssh.privateKey}}" /> <to uri="scp://{{gcg.ste.Client3_User_Name}}@{{gcg.ste.Host_Name}}:{{gcg.ste.Port_Number}}/{{gcg.ste.Destination_Client3}}?knownHostsFile={{ssh.knownHosts}}&privateKeyFile={{ssh.privateKey}}" /> <to uri="file://{{nas.root}}/{{gcg.out.prices.dir}}?fileName={{archive.dir}}" /> </multicast> <doCatch> <exception>java.lang.Exception</exception> <handled> <constant>true</constant> </handled> <to uri="file://{{nas.root}}/{{gcg.out.prices.dir}}?fileName={{error.dir}}" /> </doCatch> </doTry> The file does not reach the remote destinations nor does it produce any log and the file is moved to archive folder. I tried placing the remote destinations, the archival code and the move to error code in seperate routes and have its reference in a single multicast as below <multicast stopOnException="true"> <to uri="direct:Client1FileOut" /> <to uri="direct:Client2FileOut" /> <to uri="direct:Client3FileOut" /> <to uri="direct:MoveToArchive" /> </multicast> <route id="gcgFileOut1"> <from uri="direct:Client1FileOut" /> <doTry> <to uri="scp://{{gcg.ste.Client1_User_Name}}@{{gcg.ste.Host_Name}}:{{gcg.ste.Port_Number}}/{{gcg.ste.Destination_Client1}}?knownHostsFile={{ssh.knownHosts}}&privateKeyFile={{ssh.privateKey}}" /> <doCatch> <exception>java.lang.Exception</exception> <handled> <constant>true</constant> </handled> <to uri="direct:gcgError" /> </doCatch> </doTry> </route> However, The file does not reach the remote destinations nor does it produce any log and the file is moved to archive folder. Request you to please suggest. Regards, Manesh Belchada -- View this message in context: http://camel.465427.n5.nabble.com/Multicast-issue-tp5737388.html Sent from the Camel Development mailing list archive at Nabble.com.