Hi To pickup only one file then use the fileName or filter options to select which file.
On Fri, May 22, 2015 at 7:38 PM, Justin Rosenberg <justin.rosenb...@crlcorp.com> wrote: > I would like to leverage the endpoint abstraction Camel provides, but I > don't necessarily need a route. My use case is to simply read a file from an > FTP server. Is there a way to leverage Camel either through the API or a > route to synchronously leverage a Camel consumer endpoint? > > For example, I would like to do something like this: > > Message message = from("sftp://u...@someserver.com/dir/file.txt"); > > I understand that I could do something like: > > from("sftp://u...@someserver.com/dir/file.txt").to(someBean); > > However, that would be asynchronous, and potentially consume more than one > file. I could, in theory, spin up a dynamic route, collect messages, and > then spin it down, but that would require a lot of management. > > Another way to ask the question would be, can I leverage Camel's URI > abstraction of the JSCH API without actually creating routes? > ~Justin > > > CONFIDENTIALITY NOTICE: > > The information in this message, and any attachment, is intended for the > > sole use of the individual and entity to whom it is addressed. This > > information may be privileged, confidential, and protected from > > disclosure. If you are not the intended recipient you are hereby notified > > that you have received this communication in error and that any review, > > disclosure, dissemination, distribution or copying of it, or its contents, > > is strictly prohibited. If you think that you have received this message > > in error please notify the sender and destroy all copies of this > > communication and any attachments. Thank you. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/