Hi Justin, Have you tried to use ConsumerTemplate API? It allows you to dynamically create an endpoint and consume a single message from it.
Cheers! pt., 22.05.2015 o 19:38 użytkownik Justin Rosenberg < justin.rosenb...@crlcorp.com> napisał: > 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. >