You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Carlo Camerino <ca...@gmail.com> on 2010/06/04 05:29:58 UTC

FTP Component That Consumes On Demand

Hi,

Is there an ftp component that consumes a file on edemand? and not a
polling.

for example i have the file name already and want to fetch this file coming
from an ftp server,
how would i  route it?

from("direct:getfile").to("ftp://someurl?file-name=sd?")

would this fetch a file or would this create a file on that server?

thanks
carlo

Re: FTP Component That Consumes On Demand

Posted by Guillaume Nodet <gn...@gmail.com>.
Right, this use case is even exactly described at
   http://camel.apache.org/ftp.html#FTP-ConsumingaremoteFTPservertriggeredbyaroute

On Fri, Jun 4, 2010 at 09:43, Claus Ibsen <cl...@gmail.com> wrote:
> On Fri, Jun 4, 2010 at 9:29 AM, Guillaume Nodet <gn...@gmail.com> wrote:
>> I think Carlo wants to be able to *not* always poll for new files,
>> which is what the polling consumer does.
>
>
>> Instead, he's looking for something like an HTTP GET method, which is
>> not really a consumer but a provider with no input.
>> The idea (iiuc) would be to send an exchange to the ftp provider which
>> would cause the retrieval of the given file.
>>
>> I don't think this is possible yet.
>>
>
> This is possible using the polling consumer EIP. It will poll for a
> remote file on the FTP server.
>
> And from the routing DSL you can use pollEnrich also.
> However one caveat is that setting the endpoint uri in a dynamic
> fashion is not easy. And we know this and there is a JIRA ticket for
> that.
>
> So yes its possible.
>
>
>
>
>> On Fri, Jun 4, 2010 at 09:20, Claus Ibsen <cl...@gmail.com> wrote:
>>> Hi
>>>
>>> You are looking at the polling consumer EIP
>>> http://camel.apache.org/polling-consumer.html
>>>
>>> However Content Enricher EIP is also doable
>>> http://camel.apache.org/content-enricher.html
>>>
>>> as there is a pollEnrich DSL for that. However passing in the filename
>>> on the URI is a bit hard to do.
>>> There is a JIRA ticket to enhance this in the future
>>>
>>>
>>>
>>> On Fri, Jun 4, 2010 at 5:29 AM, Carlo Camerino <ca...@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> Is there an ftp component that consumes a file on edemand? and not a
>>>> polling.
>>>>
>>>> for example i have the file name already and want to fetch this file coming
>>>> from an ftp server,
>>>> how would i  route it?
>>>>
>>>> from("direct:getfile").to("ftp://someurl?file-name=sd?")
>>>>
>>>> would this fetch a file or would this create a file on that server?
>>>>
>>>> thanks
>>>> carlo
>>>>
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> Apache Camel Committer
>>>
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>> Open Source Integration: http://fusesource.com
>>> Blog: http://davsclaus.blogspot.com/
>>> Twitter: http://twitter.com/davsclaus
>>>
>>
>>
>>
>> --
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
>> ------------------------
>> Open Source SOA
>> http://fusesource.com
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: FTP Component That Consumes On Demand

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Jun 4, 2010 at 9:29 AM, Guillaume Nodet <gn...@gmail.com> wrote:
> I think Carlo wants to be able to *not* always poll for new files,
> which is what the polling consumer does.


> Instead, he's looking for something like an HTTP GET method, which is
> not really a consumer but a provider with no input.
> The idea (iiuc) would be to send an exchange to the ftp provider which
> would cause the retrieval of the given file.
>
> I don't think this is possible yet.
>

This is possible using the polling consumer EIP. It will poll for a
remote file on the FTP server.

And from the routing DSL you can use pollEnrich also.
However one caveat is that setting the endpoint uri in a dynamic
fashion is not easy. And we know this and there is a JIRA ticket for
that.

So yes its possible.




> On Fri, Jun 4, 2010 at 09:20, Claus Ibsen <cl...@gmail.com> wrote:
>> Hi
>>
>> You are looking at the polling consumer EIP
>> http://camel.apache.org/polling-consumer.html
>>
>> However Content Enricher EIP is also doable
>> http://camel.apache.org/content-enricher.html
>>
>> as there is a pollEnrich DSL for that. However passing in the filename
>> on the URI is a bit hard to do.
>> There is a JIRA ticket to enhance this in the future
>>
>>
>>
>> On Fri, Jun 4, 2010 at 5:29 AM, Carlo Camerino <ca...@gmail.com> wrote:
>>> Hi,
>>>
>>> Is there an ftp component that consumes a file on edemand? and not a
>>> polling.
>>>
>>> for example i have the file name already and want to fetch this file coming
>>> from an ftp server,
>>> how would i  route it?
>>>
>>> from("direct:getfile").to("ftp://someurl?file-name=sd?")
>>>
>>> would this fetch a file or would this create a file on that server?
>>>
>>> thanks
>>> carlo
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: FTP Component That Consumes On Demand

Posted by Guillaume Nodet <gn...@gmail.com>.
I think Carlo wants to be able to *not* always poll for new files,
which is what the polling consumer does.
Instead, he's looking for something like an HTTP GET method, which is
not really a consumer but a provider with no input.
The idea (iiuc) would be to send an exchange to the ftp provider which
would cause the retrieval of the given file.

I don't think this is possible yet.

On Fri, Jun 4, 2010 at 09:20, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> You are looking at the polling consumer EIP
> http://camel.apache.org/polling-consumer.html
>
> However Content Enricher EIP is also doable
> http://camel.apache.org/content-enricher.html
>
> as there is a pollEnrich DSL for that. However passing in the filename
> on the URI is a bit hard to do.
> There is a JIRA ticket to enhance this in the future
>
>
>
> On Fri, Jun 4, 2010 at 5:29 AM, Carlo Camerino <ca...@gmail.com> wrote:
>> Hi,
>>
>> Is there an ftp component that consumes a file on edemand? and not a
>> polling.
>>
>> for example i have the file name already and want to fetch this file coming
>> from an ftp server,
>> how would i  route it?
>>
>> from("direct:getfile").to("ftp://someurl?file-name=sd?")
>>
>> would this fetch a file or would this create a file on that server?
>>
>> thanks
>> carlo
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: FTP Component That Consumes On Demand

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You are looking at the polling consumer EIP
http://camel.apache.org/polling-consumer.html

However Content Enricher EIP is also doable
http://camel.apache.org/content-enricher.html

as there is a pollEnrich DSL for that. However passing in the filename
on the URI is a bit hard to do.
There is a JIRA ticket to enhance this in the future



On Fri, Jun 4, 2010 at 5:29 AM, Carlo Camerino <ca...@gmail.com> wrote:
> Hi,
>
> Is there an ftp component that consumes a file on edemand? and not a
> polling.
>
> for example i have the file name already and want to fetch this file coming
> from an ftp server,
> how would i  route it?
>
> from("direct:getfile").to("ftp://someurl?file-name=sd?")
>
> would this fetch a file or would this create a file on that server?
>
> thanks
> carlo
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus