Re: sftp file transfer issue

2009-10-12 Thread Claus Ibsen
Hi I assume you are using Windows which has a file system which can be troublesome. Do you have any anti virus or the likes scanning the folder in question? They can block files and cause java programs not to be able to work on the files during the time they block the file. If you try with

Re: sftp file transfer issue

2009-10-12 Thread Claus Ibsen
On Mon, Oct 12, 2009 at 8:13 AM, Claus Ibsen claus.ib...@gmail.com wrote: Hi I assume you are using Windows which has a file system which can be troublesome. Do you have any anti virus or the likes scanning the folder in question? They can block files and cause java programs not to be able

Re: catch error in producer endpoint

2009-10-12 Thread Claus Ibsen
On Sat, Oct 10, 2009 at 10:28 AM, Claus Ibsen claus.ib...@gmail.com wrote: On Fri, Oct 9, 2009 at 11:20 PM, parasmk para...@gmail.com wrote: Claus Ibsen-2 wrote: See the pollStrategy option on this page: http://camel.apache.org/polling-consumer.html You can then configure your own poll

Re: File component blocked by existing files

2009-10-12 Thread Claus Ibsen
On Mon, Oct 12, 2009 at 10:15 AM, Vladimir Okhotnikov vokhotni...@gmail.com wrote: Yes, I known about the readLockTimeout option. The problem with this option is that by a) default it waits forever and b) while it waits for one file it does not process others. That's what made me spend 2 days

Re: File component blocked by existing files

2009-10-12 Thread Vladimir Okhotnikov
Sorry for the poor English - I know about the timeout option now - I saw it immediately AFTER I found the reason. I obviously saw the option before, among others, but did not pay enough attention to realize I should not use the default. And I did have the camel DEBUG level enabled - was the

Re: File component blocked by existing files

2009-10-12 Thread Claus Ibsen
On Mon, Oct 12, 2009 at 12:27 PM, Vladimir Okhotnikov vokhotni...@gmail.com wrote: Sorry for the poor English - I know about the timeout option now - I saw it immediately AFTER I found the reason. I obviously saw the option before, among others, but did not pay enough attention to realize I

Re: File component blocked by existing files

2009-10-12 Thread Claus Ibsen
BTW if you want to speed up the file routing you can use the async concurrency. A bit on this blog http://davsclaus.blogspot.com/2009/05/on-road-to-camel-20-concurrency-with.html Note the DSL was renamed from async to threads And then use a single file consumer to avoid race conditions for

Re: catch error in producer endpoint

2009-10-12 Thread parasmk
Claus Ibsen-2 wrote: The pollStrategy lets you handle the error at this current polling. By default the ftp consumer will poll every second. You can change this interval by setting a delay on the FTP endpoint, to ex ?delay=6 to poll once every 60th seconds. The delay is in millis.

Re: catch error in producer endpoint

2009-10-12 Thread Claus Ibsen
On Mon, Oct 12, 2009 at 1:15 PM, parasmk para...@gmail.com wrote: Claus Ibsen-2 wrote: The pollStrategy lets you handle the error at this current polling. By default the ftp consumer will poll every second. You can change this interval by setting a delay on the FTP endpoint, to ex

Re: File component blocked by existing files

2009-10-12 Thread Vladimir Okhotnikov
Thanks for the changes and suggestions - for my case just setting the timeout to 5 or 10 seconds should suffice, but at least I got some insight about async options and the reason file component does work sequentially. Claus Ibsen-2 wrote: BTW if you want to speed up the file routing you can

Re: Upgrading to 2.0 - Using FileExchange

2009-10-12 Thread sub3
Thanks. That got me past the compilation errors, but I am not able to get it to trigger in 2.0. Below is the same code from when I was integrated with 1.3.0 (Except removing FileExchange). I don't know if the file handling is correct, but my problem is that I don't even get to that code.

Re: Upgrading to 2.0 - Using FileExchange

2009-10-12 Thread Claus Ibsen
On Mon, Oct 12, 2009 at 3:50 PM, sub3 st...@subwest.com wrote: Thanks.  That got me past the compilation errors, but I am not able to get it to trigger in 2.0. Below is the same code from when I was integrated with 1.3.0 (Except removing FileExchange).  I don't know if the file handling is

Issue with interceptSendToEndpoint

2009-10-12 Thread Martin Krasser
When I send a message to direct:test1 in the following route builder, the hello is written three-times to the console instead of only once, as expected. interceptSendToEndpoint(direct:intercept) .process(new Processor() { public void process(Exchange exchange) throws Exception {

Re: Issue with interceptSendToEndpoint

2009-10-12 Thread Claus Ibsen
On Mon, Oct 12, 2009 at 6:47 PM, Martin Krasser d...@martin-krasser.de wrote: When I send a message to direct:test1 in the following route builder, the hello is written three-times to the console instead of only once, as expected. interceptSendToEndpoint(direct:intercept) .process(new

Re: modify message before delivering to Dead Letter Queue

2009-10-12 Thread Claus Ibsen
Hi Maybe we should let Camel add the endpoint a producer is sending to. Then when you route using .to(xxx) then Camel will add a header such as Exchange.SENDTO_ENDPOINT Which contains the XXX That would allow you to easily know which service failed. On Sun, Oct 11, 2009 at 1:39 AM, tide08

Calling setHeader() after to()

2009-10-12 Thread Dragisa Krsmanovic
I am trying to do something like: from(activemq:plos.pmc) .to(rnc:pmc-message.rnc) .setHeader(DOI).xpath(/ambraMessage/doi/text(), String.class) .setHeader(Exchange.FILE_NAME).xpath(/ambraMessage/archive/text(),String.class) ... But it doesn't allow me to add any setHeader

Re: Upgrading to 2.0 - Using FileExchange

2009-10-12 Thread sub3
Thanks, that helped. I also forgot the context.start() too, which caused the last problem. If you don't mind, I have one follow up question: In Camel 1.3.0, when I used 'from(file://directory?delete=true)' and I shutdown the system before finishing the file, I was left with a file.txt.camelLock

Re: Upgrading to 2.0 - Using FileExchange

2009-10-12 Thread Claus Ibsen
On Tue, Oct 13, 2009 at 1:57 AM, sub3 st...@subwest.com wrote: Thanks, that helped.  I also forgot the context.start() too, which caused the last problem. If you don't mind, I have one follow up question: In Camel 1.3.0, when I used 'from(file://directory?delete=true)' and I shutdown the

Re: Calling setHeader() after to()

2009-10-12 Thread Claus Ibsen
On Mon, Oct 12, 2009 at 10:39 PM, Dragisa Krsmanovic dkrsmano...@plos.org wrote: I am trying to do something like:  from(activemq:plos.pmc)    .to(rnc:pmc-message.rnc)    .setHeader(DOI).xpath(/ambraMessage/doi/text(), String.class)