Hi,
I was working with something similar to this problem. But I am not able to
capture the exceptions properly.
Setps:
1. Download the existing file from the FTP
2. Push the file to backup folder and append the file name with current date
3. Push a new file to the FTP which has a complete new fi
Hi Dilip,
doesn't a single ftp route with fileExist=Move fulfil your
requirements? You mention that you use direct routes so starting from
a direct route with body set to payload of the new file to be uploaded
to the FTP server and CamelFileName header set to the file name:
from("direct:uploa
Hi,
Basic idea here is to capture any exception that may occur due to failure in
FTP connections or any other form of exception. Since the process is
happening inside the contentBackupProcessor, Camel is basically ignoring the
exception and continuing with the next operation as if nothing wrong
h
Hi,
I also tried your suggestions like below
from("ftp://username@localhost:8899/...")
.mulitcast().to("direct:processes-backup","direct:upload-fresh");
from("direct:process-backup")
.bean(responseTranslator,"translate").
But when I started my jetty server where the service is deploy
Hi, Thanks for the reply,
The thing is we don't have multiple FTP servers. We have only one server
where all operations happens.
1. At the root folder of the FTP, there is file that needs to be deleted
2. Before deleting that file, the file should be taken as a backup and
placed in one of the sub
Hi Dilip,
this to me seems to be an overly complicated solution to a simple
problem. If I understand your problem correctly: you gather a file
from ftp server1 and push to two different ftp servers, serverA and
serverB, the serverA gets the transformed file and serverB gets the
original file (backu
Hi,
I was working with something similar to this problem. But I am not able to
capture the exceptions properly.
Setps:
1. Download the existing file from the FTP
2. Push the file to backup folder and append the file name with current date
3. Push a new file to the FTP which has a complete new
On Thu, Dec 16, 2010 at 9:28 AM, Andreas A. wrote:
>
> If I use receiveNoWait() no files will be downloaded from the ftp, maybe
> because the the ftp component doesn't have time to login to the ftp?
> --
Ah yeah that is correct, there is no wait :)
That works better if you poll messages from a qu
If I use receiveNoWait() no files will be downloaded from the ftp, maybe
because the the ftp component doesn't have time to login to the ftp?
--
View this message in context:
http://camel.465427.n5.nabble.com/Using-ConsumerTemplate-to-fetch-files-tp3304671p3307566.html
Sent from the Camel - User
Its probably best to receive without any timeout, using receiveNoWait.
On Tue, Dec 14, 2010 at 6:43 PM, Andreas A. wrote:
>
> Hi
>
> Something fishy is still going on, this is the code now:
>
> String ftpsUri =
> "ftp:localhost:1981/inbox?consumer.delay=1h&username=camel&password=camel123&move=.
Hi
Something fishy is still going on, this is the code now:
String ftpsUri =
"ftp:localhost:1981/inbox?consumer.delay=1h&username=camel&password=camel123&move=.done";
String fileUri = "file:{{path.in}}";
consumer.start();
while(true) {
Exchange exchange = consumer.receive(ftpsUri, 5000
I have created a ticket to make this easier using the ConsumerTemplate API
https://issues.apache.org/jira/browse/CAMEL-3427
Check the source code in trunk, how to do it in your Camel version.
On Tue, Dec 14, 2010 at 4:39 PM, Andreas A. wrote:
>
> Can't find anything along those lines. I tried d
Oh it was a private method. Thought you meant in the api. I suppose I should
do the manual handover then. Just pasting here for future reference:
if (exchange.getUnitOfWork() == null) {
// handover completions and done them manually to ensure they are being
executed
List synchroni
Can't find anything along those lines. I tried doing
while(true) {
Exchange ex = consumer.receive(ftpsUri, 5000);
if(ex != null) {
logger.info("Fetching file: " +
ex.getIn().getHeader("CamelFileName"));
producer.send(fileUri, ex);
On Tue, Dec 14, 2010 at 4:27 PM, Andreas A. wrote:
>
> However if I use only receiveBody I miss the headers like the filename etc.
> --
Then you need to done the Exchange yourself. See the doneUoW method in
DefaultConsumerTemplate
> View this message in context:
> http://camel.465427.n5.nabble.
However if I use only receiveBody I miss the headers like the filename etc.
--
View this message in context:
http://camel.465427.n5.nabble.com/Using-ConsumerTemplate-to-fetch-files-tp3304671p3304747.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Ah ok!
--
View this message in context:
http://camel.465427.n5.nabble.com/Using-ConsumerTemplate-to-fetch-files-tp3304671p3304746.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Hi
I should be a subscriber. I have made 100+ posts via nabble. I haven't
changed anything regarding my account, are my posts not accepted on the
mailinglist anymore or?
I've tried with both 2.5 and 2.6. I'm getting some really odd behaviour -
why is it stacking the base dir "inbox"?:
-> ERROR
Since you work with the low level Exchange, you need to done it if you want
it to move the files.
exchange.getUnitOfWork().done(exchange);
This is done automatic for you in Camel 2.5 onwards if you use, eg
receiveBody instead
Object body = consumer.redeveiveBody("uri", xxx);
--
View this messag
Are you a subscriber of the mailing list? I haven't seen you mail before.
You need Camel 2.5 or better AFAIR for the consumer template to work with
files, where it supports deleting / moving files when done.
--
View this message in context:
http://camel.465427.n5.nabble.com/Using-ConsumerTempla
20 matches
Mail list logo