On Mon, Feb 7, 2011 at 5:56 PM, Xavier Coulon <xcou...@gmail.com> wrote: > > Hello, > > I'm currently evaluating Camel for Data Integration purpose. So far, it > works very well, but I'm facing the following issue in my test case : when > dealing with a (not so) large file (5k lines), the Camel Context is shutdown > before all lines are processed, and some assertions > (MockEndpoint.expectedMessageCount()) fail. Still, I can by-pass this issue > by adding a Thread.sleep() in my test and get the expected result. (Unless > there 's some better way to proceed ?) > > Now, in a context of ETL, the first step would be loading data into a > staging database with Camel, and *then* (2nd step) perform some business > controls before publishing in production (3rd step). > My question is : how can I detect that the initial/input file was fully > treated (end of 1st step) before starting the business controls ?
You can also look at on completion http://camel.apache.org/oncompletion.html That allows you to do additional route after the exchange has been completed. For example to signal some internal state that you are done or whatever. > Would you recommend using JMX or BAM ? Or can a listener be notified when > some queue was idle for a given time ? > Camel has an EventNotifier which acts as a global listener. http://camel.apache.org/eventnotifier-to-log-details-about-all-sent-exchanges.html And as Hadrian also pointed out there is BAM as well http://camel.apache.org/bam > Thank you in advance > Regards, > Xavier > -- > View this message in context: > http://camel.465427.n5.nabble.com/ETL-how-to-monitor-the-end-of-processing-tp3374562p3374562.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/