Current camel-exec component just wait the new create process to be stopped. If the command is need to take some time to run and it will block the thread for further processing. I think you can write a custom process to produce the output monitor message as you want.
Calling the command, Scan the output stream periodically Use ProducerTemplate to send the message to next endpoint Do some clean up work yourself. If want to do some enhancement on the camel-exec component I think you need to find way combine the output of exec component with the stream input stream, and it should be defined when you define the route. -- Willem Jiang FuseSource Web: http://www.fusesource.com (http://www.fusesource.com/) Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: willemjiang On Tuesday, August 28, 2012 at 10:57 PM, Lars Lipinski wrote: > Hi, > > I'm using the exec-Component to start a long running execution and would > like to create new messages with progress information, while it is running. > The goal is to send out messages with a progress value, that is calculated > based on output in stdout/stderr of the executed program (here: ffmpeg) > > As far as I experienced and understood the sources of the Exec-Classes, the > ExecResult is only propagated to the next processing step in the route after > the execution finished completely (or aborted). > Thus the stdout and stderr in ExecResult are not available as stream for > parsing during runtime of the execution, am I right? > > So I wonder if I missed something or a solution with the given powerful > toolset of Camel - or do I really have to create a custom component for the > needed behaviour? > I'd consider this feature worth to be included in standard components. > > Any suggestions on other components? > Maybe I'd need a solution to combine exec-component with stream-component > (with option scanStream)? > I'm thinking of achieving a route basically like: > > from("direct:conversionjob") > .threads(4) > .to("exec:ffmpeg?args=someargs") > .to("seda:progressmsgs"); > > > thank you, > Lars > > > I'm using Camel 2.10 Release in a standalone Java application (openJDK 1.6, > CentOS), configuring my routes with Java DSL. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Exec-component-get-stdout-streaming-while-not-finished-tp5718201.html > Sent from the Camel - Users mailing list archive at Nabble.com > (http://Nabble.com).