Hi In lack of a better subject I named it "Triggering scheduled consumers"
An end user had a very decent question last day that was a bit of a challenge for me to do nicely in Camel (and still is). See nabble: http://www.nabble.com/Trigger-causes-Poll-from-ftp-server-to-sftp-td20934240s22882.html The use-case is that he wants to poll a file from a FTP server from within a route. And how do you do that in Camel? As the FTP consumer is a scheduled consumer its only to be used in the from type. But he wants to trigger this when a message arrives on a JMS queue from(jms:queue).XXXXX.to(somewhere else) where XXX is where we download the file from the FTP server I do think that downloading a single file from a FTP server, or reading a file from a file system should be easy and possible from within a route. But for both the FTP consumer and the File consumer they are scheduled based. And this is because they can by interval scan folders for files to consume and fire them in the route. However reusing these components for a use-case: I need to download a file or I need to read a file is a valid question that end users of Camel will raise and try/expect it to be able to. So do we have other Camel components where end users might wanna do something like this? For instance Jon's new RSS component? So I am wondering how we should support this for the future? Using endpoint.createPollingConsumer() was my first thought of a nice solution but then again it expects a single Exchange as return and the FTP and File consumers is event based firing a new exchange per file they process. But this API is probably where we should go, so end users can do PollingConsumer pc = endpoint.createPollingConsumer(); Exchange exchange = pc.receive(); For now I am just spinning of this thread for starters. -- /Claus Ibsen Apache Camel Committer Blog: http://davsclaus.blogspot.com/
