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.
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.
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
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
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
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
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
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()."
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
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)
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
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
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
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
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
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
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
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.
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
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.
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 "
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.
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
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)
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
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
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
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
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.
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.
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
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
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
33 matches
Mail list logo