Re: Dynamic "from" and pollEnrich

2017-05-08 Thread geppo
Thanks souciance, yes I have header where I store the date, as per my original post: "I want to trigger this route from a restful where the date part of the file is specified in input i.e. template.sendBodyAndHeaders("direct:myRoute", null, "header:date", "20170508") " I've tried ${headers.

Re: Dynamic "from" and pollEnrich

2017-05-08 Thread geppo
Thank you Claus, if I understood right then my route should change like this: from("direct:myRoute") .transacted() .id("MyRoute") .pollEnrich().simple("file://folder?fileName=filename_${header:date}.txt") .process(new MyProcessor()) But nothing changed really.

Dynamic "from" and pollEnrich

2017-05-08 Thread geppo
I have a route with files (filename_MMDD.txt) as input endpoint i.e. from("file://folder/filename_*.txt") .transacted() .id("MyRoute") .process(new MyProcessor); I want to trigger this route from a restful where the date part of the file is specified in input i.e. tem

Re: Endpoint issue when upgrading to Camel 2.15.2 (dollar sign in URI)

2015-06-19 Thread geppo
It looks like using .recipientList(simple(endpointOutput)) instead of: .to(endpointOutput) does the trick. Still I don't understand how comes it works on Camel 2.9.3... -- View this message in context: http://camel.465427.n5.nabble.com/Endpoint-issue-when-upgrading-to-Camel-2-15-2-d

Endpoint issue when upgrading to Camel 2.15.2 (dollar sign in URI)

2015-06-18 Thread geppo
Hi, I'm trying to upgrade from Camel 2.9.3 to 2.15.2. The route is very simple: from(endpointInput) .routeId("MyRoute") .process(myProcessor) .to(endpointOutput); where endpointOutput = "myEndpoint:fail:string:file_name?expression=${file:onlyname}" myEndpoint is defined as a

Re: Exchange setBody not working with Camel 2.15.2

2015-05-26 Thread geppo
P.S. I've tried different versions of Camel. The bug seems to have been introduced between version 2.14.2 and version 2.15.0 -- View this message in context: http://camel.465427.n5.nabble.com/Exchange-setBody-not-working-with-Camel-2-15-2-tp5767420p5767474.html Sent from the Camel - Users maili

Re: Exchange setBody not working with Camel 2.15.2

2015-05-26 Thread geppo
Thanks hekonsek for the reply. I'll do it as soon as I can (I need to cleanup the code from all references to my company). I think the problem is on how the new Camel handles the command: exchange.getIn().setBody(null) where: - exchange is DefaultExchange - exchange.getIn() is GenericFileMess

Re: Exchange setBody not working with Camel 2.15.2

2015-05-22 Thread geppo
Also the official API doc says using getIn() is fine: http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Exchange.html "If your Processor is not producing a different Message but only needs to slightly modify the in, you can simply update the in Message returned by getIn()."

Re: Exchange setBody not working with Camel 2.15.2

2015-05-22 Thread geppo
I've found a way to fix the issue by using getOut() instead of getIn() i.e. exchange.getOut().setBody(null); but I'm not happy: 1) the headers of the message are not exactly the same, so now I will have to add code to copy the headers 2) I should not need to change the code. Using getIn() should

Exchange setBody not working with Camel 2.15.2

2015-05-22 Thread geppo
Hi, I'm upgrading some programs from Camel 2.9.3 to 2.15.2 and I'm having all sort of issues. One of them is that I'm filtering out messages with Null body, but the new version of Camel doesn't think that the body is Null. The route is really simple e.g. from(DirectRoutes.MyRoute)

Upgrading to Camel 2.14.1 and CompositeRegistry issue

2015-02-25 Thread geppo
Hi, I'm trying to upgrade some legacy code to use Camel 2.14.1, but I'm getting an AbstractMethodError when the method lookupByNameAndType is called. Any idea what this means and/or how I can fix it? Many thanks! Caused by: org.apache.camel.NoSuchBeanException: Cannot lookup: properties from regis

Re: Idempotent and errorHandler

2015-02-05 Thread geppo
Great! That works. Thank you very much. Any idea how to log the filename on error? By default it just logs the ExchangeId, which is not very useful. -- View this message in context: http://camel.465427.n5.nabble.com/Idempotent-and-errorHandler-tp5762408p5762412.html Sent from the Camel - Users

Idempotent and errorHandler

2015-02-05 Thread geppo
Hi, I have a route with a File idempotent repository and an errorHandler. When a specific file causes an error I want it to be added to the idempotent repository so it doesn't get processed again. Any idea how to do it? With the code below, the corrupted file is not added to the idempotent reposi

Re: Cannot cast DefaultCamelContext to ModelCamelContext

2015-01-22 Thread geppo
Found the problem, my project is using Camel 2.9.3, but it has a dependency on another project which uses Camel 2.8.0 and for whatever reason the lower version jar is the one loaded by Eclipse when running the test. Thanks for your help! -- View this message in context: http://camel.465427.n5.n

Re: Cannot cast DefaultCamelContext to ModelCamelContext

2015-01-22 Thread geppo
I am not type casting myself. The cast is inside the class CamelTestSupport: All I'm doing is overriding the createCamelContext, which I've done succesfully in the past: Do you know if the DefaultCamelContext in a previous version of Camel didn't implement the interface ModelCamelContext? Maybe

Cannot cast DefaultCamelContext to ModelCamelContext

2015-01-22 Thread geppo
Hi, I've written a JUnit test in Eclipse for a Camel route. It has been working fine for days, but now it doesn't startup failing in the CamelTestSupport.setUp method: I've tried to cleanup the Maven repository especially the camel-core, camel-test and junit repositories. When I right-click on t

Cannot cast DefaultCamelContext to ModelCamelContext

2015-01-22 Thread geppo
Hi, I've written a JUnit test in Eclipse for a Camel route. It has been working fine for days, but now it doesn't startup failing in the CamelTestSupport.setUp method: I've tried to cleanup the Maven repository especially the camel-core, camel-test and junit repositories. When I right-click on t

Re: transacted() after from()

2014-11-26 Thread geppo
Thank you! -- View this message in context: http://camel.465427.n5.nabble.com/transacted-after-from-tp5759661p5759663.html Sent from the Camel - Users mailing list archive at Nabble.com.

transacted() after from()

2014-11-26 Thread geppo
I ready in the Camel In Action book: “NOTE: When using transacted() in the Java DSL, you must add it right after from() to ensure that the route is properly configured to use transac- tions. This isn’t enforced in the DSL because the DSL is loosely defined to make it easy to maintain and develop C

Re: Expression Language and date:now minus/plus N days

2014-10-28 Thread geppo
2.9.3 and unfortunately I can't upgrade at this stage -- View this message in context: http://camel.465427.n5.nabble.com/Expression-Language-and-date-now-minus-plus-N-days-tp5758210p5758240.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Expression Language and date:now minus/plus N days

2014-10-28 Thread geppo
I'm really struggling writing the custom filter. I have defined my own filter which implements GenericFileFilter, but it's only filtering files. It doesn't filter directories. So for example let's say I have the following folder: /2014/Oct/10/somefile.txt I have no idea how to ignore the folder "

Re: Expression Language and date:now minus/plus N days

2014-10-28 Thread geppo
Thank you, I will do that. I was hoping for something ready made :) -- View this message in context: http://camel.465427.n5.nabble.com/Expression-Language-and-date-now-minus-plus-N-days-tp5758210p5758225.html Sent from the Camel - Users mailing list archive at Nabble.com.

Expression Language and date:now minus/plus N days

2014-10-28 Thread geppo
Hi, I need to set a Camel route which polls files from a directory and all its subdirectories every 5 minutes: /2014/Jan/1 /2014/Jan/2 ... /2014/Oct/28 The way it is at the moment it's scanning all subdirectories from the first of January to today, which is very slow. I would like to

Transacted route not committing

2014-01-14 Thread geppo
Hi, I've written a transacted route from("file:data.inbox?noop=true,readLock:none") .transacted() .id(getClass().getSimpleName() + "- Route1") .idempotentConsumer(simple("${file:name}"), idempotentRepository)

Using log method during Error Handler

2014-01-10 Thread geppo
Hi, I've defined an Error Handler, which applies to multiple routes i.e. errorHandler(transactionErrorHandler() .maximumRedeliveries(5) .log("SOMETHING USELESS"); from(file1) .id(route1) .transacted() .process(new SpecificProcessor1()); from(fi

RE: Annoying warning (SftpOperations - JSCH -> Permanently added XXX to the list of known hosts)

2014-01-10 Thread geppo
Does anybody know how to get rid of the following message that keeps getting logged over and over? Kerberos username [xxx]: -- View this message in context: http://camel.465427.n5.nabble.com/Annoying-warning-SftpOperations-JSCH-Permanently-added-XXX-to-the-list-of-known-hosts-tp5745014p574

Re: File component and include option

2014-01-09 Thread geppo
Thank you Christian, unfortunately I've just realised that we use Camel 2.9 and antInclude is only available from 2.10 onwards. -- View this message in context: http://camel.465427.n5.nabble.com/File-component-and-include-option-tp5745730p5745776.html Sent from the Camel - Users mailing list ar

File component and include option

2014-01-08 Thread geppo
Hi, I have a File Consumer that reads files (something.txt) from the following folders: file://base/something/2013/12/30/specific/even/more file://base/something/2013/12/31/specific/even/more file://base/something/2014/01/01/specific/even/more etc. so the middle part of the folder name is variabl

Re: Camel RemoteFilePollingConsumerPollStrategy and retry

2014-01-07 Thread geppo
Thank you! -- View this message in context: http://camel.465427.n5.nabble.com/Camel-RemoteFilePollingConsumerPollStrategy-and-retry-tp5745503p5745665.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel RemoteFilePollingConsumerPollStrategy and retry

2014-01-06 Thread geppo
yes -- View this message in context: http://camel.465427.n5.nabble.com/Camel-RemoteFilePollingConsumerPollStrategy-and-retry-tp5745503p5745634.html Sent from the Camel - Users mailing list archive at Nabble.com.

Camel RemoteFilePollingConsumerPollStrategy and retry

2014-01-03 Thread geppo
Hi, I'm extending the GenericFileConsumer and setting the Poll Strategy to RemoteFilePollingConsumerPollStrategy. At the moment if there is an error when the pollDirectory method is called the polling is executed again, and again, and again,... [WARN] RemoteFilePollingConsumerPollStrategy : Trying

RE: Annoying warning (SftpOperations - JSCH -> Permanently added XXX to the list of known hosts)

2013-12-19 Thread geppo
Great answer siano! That worked perfectly. I'm still getting the following every minute, which is still a bit annoying, but at least is much shorter and all in one line: Kerberos username [xxx]: Kerberos username [xxx]: Kerberos username [xxx]: Thank you! -- View this message in co

Annoying warning (SftpOperations - JSCH -> Permanently added XXX to the list of known hosts)

2013-12-18 Thread geppo
Hi, I have a Camel route that requires SFTP. Everything works perfectly fine, but I get this annoying warning every minute in the logs and I don't know how to get rid of it. Any suggestion? WARN SftpOperations - JSCH -> Permanently added XXX to the list of known hosts -- View this message in co