I think we could add some feature on the ScheduledPollConsumer to stop processing the message if some kind of flag is set. As current implementation doesn't check if there is some exception is thrown when processing the exchange.
BTW, I just found the File component support the option of "maxMessagesPerPoll". It could be more easy to stop the route if the maxMessagesPerPoll=1. -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.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, December 4, 2012 at 7:01 AM, Christian Müller wrote: > I don't think you really want to stop the route (the route will no longer > polling for files and process these files). > I think you want to stop processing the exchange (the file) which is > faulty. In this case, you can use stop(). > > https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RouteStopTest.java > > Best, > Christian > > On Mon, Dec 3, 2012 at 4:52 PM, bung_ho <[email protected] > (mailto:[email protected])> wrote: > > > static
