The question is more what MEP does the remote server use.

The choices you exposed seem to imply that the remote server would return 
incoming files, which would be an InOut.
However, an ftp server or file system (an smtp server as well) use an InOnly 
pattern (on the producer side) so there is no response (or incomingFile).
By not populating an out in the Exchange, camel will automatically send the 
original message (from the outbox) to the rest of the route, therefore you 
don't need to do anything on that side.
To use incomingFiles you would need a PollingConsumer. That would be the 
enabler for the second route in Claus' example.

Hadrian


On Sep 22, 2010, at 12:32 AM, Claus Ibsen wrote:

> On Tue, Sep 21, 2010 at 8:24 PM, Bruno Borges <bruno.bor...@gmail.com> wrote:
>> So, considering this route:
>> 
>> from("file:/outbox").to("someRemoteServer").to("file:/home/inbox");
>> 
>> What do you consider to be a better design:
>> 
>> 1- a) files from outbox goes to remoteServer-producer
>>     b) remoteServer-producer sends file to remote connection
>>     c) remoteServer-endpoint forward remote incomingFiles to this route
>> rather files from outbox
>> 
>> 2- a) files from outbox goes to remoteServer-producer
>>     b) remoteServer-producer sends file to remote connection
>>     c) remoteServer-endpoint continue processing files from outbox to the
>> rest of this route
>> 
>> 
> 
> It really depends what the removeServer protocol is? Is it a file
> based then I would assume it would be more correct to do as the
> regular file/ftp does which would be.
> 
> from("file:/outbox").to("someRemoteServer");
> from("someRemoteServer").to("file:/home/inbox");
> 
> To have it in 2 routes. One as the producer, and the other as the consumer.
> They can work independent.
> 
> And if you do this in Camel
> from("file:/outbox").to("someRemoteServer").to("xxxx")
> 
> Then you can continue route the file to XXXX as well if you need it.
> 
> 
> 
> 
>> 
>> Bruno Borges
>> www.brunoborges.com.br
>> +55 21 76727099
>> 
>> "The glory of great men should always be
>> measured by the means they have used to
>> acquire it."
>>  - Francois de La Rochefoucauld
>> 
>> 
>> 
>> On Tue, Sep 21, 2010 at 2:57 PM, Claus Ibsen <claus.ib...@gmail.com> wrote:
>> 
>>> On Tue, Sep 21, 2010 at 7:17 PM, Bruno Borges <bruno.bor...@gmail.com>
>>> wrote:
>>>> Is this statement correct?
>>>> 
>>>> Are all endpoint's consumers only created when Endpoint is referenced by
>>> a
>>>> from() ?
>>>> 
>>> 
>>> consumers is created when they are needed. And from(xx) is created a
>>> consumer on endpoint xxx.
>>> Where as to(xxx) is created a producer on endpoint xxxx.
>>> 
>>> 
>>>> Cheers,
>>>> Bruno Borges
>>>> www.brunoborges.com.br
>>>> +55 21 76727099
>>>> 
>>>> "The glory of great men should always be
>>>> measured by the means they have used to
>>>> acquire it."
>>>>  - Francois de La Rochefoucauld
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> 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
>>> 
>> 
> 
> 
> 
> -- 
> 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

Reply via email to