Re: Camel Large File Processing Issues

2016-04-17 Thread h0mer
That's what I figured. But the body is already a String type, so if I do the route above without the marshal(), I don't get the content of the file in the Exchange, but rather I get just the file name and some other content (see the last part of my original post above). Here is my Route withou

Re: Camel Large File Processing Issues

2016-04-17 Thread Claus Ibsen
Do not use marshal string, it reads the content into memory. On Mon, Apr 18, 2016 at 8:15 AM, Ravindra Godbole wrote: > Have u tried this route ? > > from("file://src/data?readLock=changed&readLockCheckInterval=1500").marshal().string("UTF-8") > .split(body().tokenize("\n")) > .streaming().setH

Re: Camel Large File Processing Issues

2016-04-17 Thread Ravindra Godbole
Have u tried this route ? from("file://src/data?readLock=changed&readLockCheckInterval=1500").marshal().string("UTF-8") .split(body().tokenize("\n")) .streaming().setHeader("xxx", constant("xxx")) .aggregate(header("xxx"), new StringBodyAggregator()).completionSize(100).completionTimeout(1500) .pr

Re: Camel Large File Processing Issues

2016-04-17 Thread h0mer
That's sort of the problem. It seems I can't even do a marshal().string("UTF-8") before the split as it seems to run out of heap space. Here's what I've tried: public void configure() throws Exception { from(ftpToKafkaObj.getFtpEndpoint()) .marshal().string("UTF-8")

Re: Camel Large File Processing Issues

2016-04-17 Thread mailingl...@j-b-s.de
Hi, the bodyToString converts it, try body.tokenize() and add a marshall() call before splitt. Von meinem iPhone gesendet > Am 17.04.2016 um 23:02 schrieb h0mer : > > Hey Guys, > > So I'm trying to implement the following Route: > > FTP --> Get Large log file (3G) --> Copy to Local Working

Camel Large File Processing Issues

2016-04-17 Thread h0mer
Hey Guys, So I'm trying to implement the following Route: FTP --> Get Large log file (3G) --> Copy to Local Working Directory --> Aggregate File into chunks of some size (BatchSize = 1000) --> Write Each Batched Exchange to a Kafka Topic. Now i'm able to get the route working for small files ( <

camel-salesforce enum class generation overrides itself

2016-04-17 Thread sohrab
I am not sure what is the reasoning behind stripping '__c' from the enum class names when generating DTOs in camel-salesforce: https://github.com/apache/camel/blob/master/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java#L698 B

Re: How to log a Processor ERROR with stacktrace using DeadLetterChannel?

2016-04-17 Thread Minh Tran
Hi Jimi, Ok now I understand your requirements more clearly :) You can still achieve this by adding the redelivery policy with your error handler definition. Something like What camel would do is run your custom route on error and then log the exhausted message after that. > On 18 Apr 20

Re: How to log a Processor ERROR with stacktrace using DeadLetterChannel?

2016-04-17 Thread jimi.hullegard
Yes, exactly. I want Camel to log the error, so that we can analyze the problem later (when looking at the log file), and at the same time handle the Exchange in our "error" route, which basically means cleaning up some temporary files, and moving some other files. So we don't "handle" the Excha

Re: How to log a Processor ERROR with stacktrace using DeadLetterChannel?

2016-04-17 Thread Minh Tran
Hi Jimi What do you mean by "handle the Exchange when the error happens"? Do you mean you want to do some custom processing when you receive that particular error AND also log the stack trace? > On 18 Apr 2016, at 10:35 AM, > wrote: > > Hi Minh, > > I'm sorry, but I don't really understan

Re: How to log a Processor ERROR with stacktrace using DeadLetterChannel?

2016-04-17 Thread jimi.hullegard
Hi Minh, I'm sorry, but I don't really understand how I can achieve what I want with a redelivery policy. I mean, sure, I guess the logging would work as I want, but I still want to be able to handle the Exchange when the error happens. How can I do that if I can't define a route that the Excha

Re: How to log a Processor ERROR with stacktrace using DeadLetterChannel?

2016-04-17 Thread Minh Tran
Hi It’s easier to just define a redelivery policy profile and tell it what you want to log on exhausted. There are stacks of options you can set on it to customise it to exactly what you want to log. See here for an example http://camel.apache.org/redeliverypolicy.html

How to log a Processor ERROR with stacktrace using DeadLetterChannel?

2016-04-17 Thread jimi.hullegard
Hi, How can I log a Processor ERROR with stacktrace using DeadLetterChannel? Ie I have a route with a Processor that throws an Exception of some kind, and the route has a DeadLetterChannel configured, that sends the exchange to a "error" route. And I would like this Exception to be logged on

Re: Trigger sanity check on startup, camel style?

2016-04-17 Thread jimi.hullegard
OK, I did just that. CAMEL-9872. :) /Jimi From: Claus Ibsen Sent: Sunday, April 17, 2016 9:01 PM To: users@camel.apache.org Subject: Re: Trigger sanity check on startup, camel style? Hi Yeah you hit minor corner case, because the main class do not detec

Re: Trigger sanity check on startup, camel style?

2016-04-17 Thread Claus Ibsen
Hi Yeah you hit minor corner case, because the main class do not detect the veto. You are welcome to log a JIRA. On Sun, Apr 17, 2016 at 8:51 PM, wrote: > Thanks Claus, > > However, I can't get it to work properly. The VetoCamelContextStartException > I throw has rethrowException=false, since

Re: Trigger sanity check on startup, camel style?

2016-04-17 Thread jimi.hullegard
Thanks Claus, However, I can't get it to work properly. The VetoCamelContextStartException I throw has rethrowException=false, since I don't want a stacktrace printed. But that seems to cause Camel to get stuck during "shutdown". It prints the message about the veto, but then nothing happens, a

Re: Sending Query Parameters under Exchange.HTTP_QUERY & in URI for HTTP4 component

2016-04-17 Thread Debraj Manna
Hi , Can some one please point me to some doc where this is explained? I have seen the http4 doc but this does not explain much. Thanks, On Sat, Apr 16, 2016 at 10:55 PM, Debraj Manna wrote: > Hi, > > Can some one explain to me if there

Re: Trigger sanity check on startup, camel style?

2016-04-17 Thread Claus Ibsen
You can implement an LifecycleStrategy, and then impl the callbacks for onContextStart and there you can do your check and fail with the VetoCamelContextStartException that gets logged as a WARN and stop Camel from starting. On Sun, Apr 17, 2016 at 11:18 AM, wrote: > Hi, > > > > Is there a buil

Trigger sanity check on startup, camel style?

2016-04-17 Thread jimi.hullegard
Hi, Is there a built in way in Camel to trigger some kind of sanity check on startup? For example, I would like to have Camel check that certain directories and configuration files exist on startup. So that, if they don't exist, Camel prints a user friendly error message and shuts down. So I