Camel Http Component

2016-04-15 Thread VinothKR
Hi Team, I need to pass a Java model object to rest webservice using camel http component. Please provide me some pointers on how to achieve it. something in the route like, and since no other way is available to add dynamic url parameters we need to pass it through set headers like, urlParam

Re: Unicode characters not recognizing when reading file

2016-04-15 Thread patelp7
I figured the problem is converting from one charset to another. I realized that the file I am reading is in charset "US-ASCII" and then I am trying to convert it into "UTF-8" at which point the unicode character is lost. Any suggestions on how to fix it? -- View this message in context: http:/

RE: camel-spring-boot + @UseAdviceWith

2016-04-15 Thread David Bennison
Cheers Claus From: Jeff Segal Sent: 15 April 2016 15:40 To: users@camel.apache.org Subject: Re: camel-spring-boot + @UseAdviceWith Very exciting! I'll probably still have to employ a work-around for now but look forward to using this once 2.17.1 is release

Re: Best Strategy to process a large number of rows in File

2016-04-15 Thread Brad Johnson
I suspect the biggest problem you may be having here is that the file isn't truly streaming but getting slurped into memory as a whole. I don't know that for certain but that test of two queues should show you that. That might be throwaway code or it might be the basis for a next implementation.

Re: Best Strategy to process a large number of rows in File

2016-04-15 Thread Michele
How big is that object on the queue? As optimization, I changed generic LinkedHashMap in a bean SerialNumber that has this properties public class SerialNumber implements Serializable { private static final long serialVersionUID = -9067015746823050409L; private Date arg1;

Re: camel-spring-boot + @UseAdviceWith

2016-04-15 Thread Jeff Segal
Very exciting! I'll probably still have to employ a work-around for now but look forward to using this once 2.17.1 is released. Thanks! Jeff On Fri, Apr 15, 2016 at 8:54 AM, Claus Ibsen wrote: > Hi > > I got time to work on this today and got this working > https://issues.apache.org/jira/browse

Re: Best Strategy to process a large number of rows in File

2016-04-15 Thread Brad Johnson
The easiest way to think about SEDA queues is to recognize why they were created and I think that will help you decompose such problems. Staged Event Driven Architecture. Initially they were invented for auto management of threads on queues where one stage that is getting too few threads could ste

Re: Best Strategy to process a large number of rows in File

2016-04-15 Thread Michele
Hi Jens, exactly, approximately 1.6 msg/s. The processes responsible for reading the queue is single-threaded?? No, I defined a PooledConnectionFactory with concurrentConsumers 10 and 8 max connections, limited with prefetchSize of 10 to avoid OOM. In addition, I added a custom parallelProcessi

Help with Camel Spark component

2016-04-15 Thread cristisor
Hi. Our company has been using Apache Camel for various purposes for some time. Now we want to integrate with a Apache Spark cluster for big data processing, and we would like to use Camel as much as possible. The latest release of Camel came with a new component, for running Spark jobs. The docum

Re: Best Strategy to process a large number of rows in File

2016-04-15 Thread Brad Johnson
6 hours? I'm currently streaming a 50k line file through Beanio with seda queues in and doing similar processing in under a minute. You have a queue here tht appears to have something on it that isbeing unmarashalled and then split. How big is that object on the queue? Is it only a single line

Re: how to hold temporary data to use later.....

2016-04-15 Thread Quinn Stevenson
This sounds like a good application of an aggregator ( http://camel.apache.org/aggregator2.html ) Keep the first lines in the aggregation repository, and then have it complete one the file is uploaded. On completion, you can update the DB. > On Apr 15

Re: Best Strategy to process a large number of rows in File

2016-04-15 Thread Jens Breitenstein
Hi Michele Reading a CSV with 40k lines using camel in streaming takes a view seconds. As you limit the queue-size to avoid OOM the entire performance depends how fast you can empty the queue. How long does processing of ONE message take in average? To me it looks like approximately 1.6 secs (

HTTP4 Endpoint - Read time out behavior is strange

2016-04-15 Thread Binu Surendran
We are using Camel HTTP4 endpoint for calling to external webservice. The connection time out and read time are provided thru the endpoint options, like below. /http4://api.webservice.com?httpClient.soTimeout=200;httpClient.connectionTimeout=200/ The camel route from which this endpoint calls co

RE: Best Strategy to process a large number of rows in File

2016-04-15 Thread Michele
Hi, I spent a bit of time reading different topics on this issue, and I changed my route like this reducing the memory usage of about 300Mb: ${date:now:MMdd-HHmmss} CBIKIT_INBOUND_${in.header.ImportDateTime}

Re: camel-spring-boot + @UseAdviceWith

2016-04-15 Thread Claus Ibsen
Hi I got time to work on this today and got this working https://issues.apache.org/jira/browse/CAMEL-9332 There is a few tests here showing how it now works https://github.com/apache/camel/tree/master/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/mockendpoints You basic

Re: camel-spring-boot + @UseAdviceWith

2016-04-15 Thread Jeff Segal
I may be in the same boat. May I ask - did you rip out Spring Boot entirely or just use vanilla camel-spring + Spring Boot? I'm hoping just the latter. On Fri, Apr 15, 2016 at 2:29 AM, David Bennison wrote: > Fortunately I am not too far into my project so I've branched and ripped > out Camel Sp

RE: Store un-evaluated simple expression, and evaluate on use?

2016-04-15 Thread jimi.hullegard
On Friday, April 15, 2016 1:36 PM, claus.ib...@gmail.com wrote: > > > > > > On Fri, Apr 15, 2016 at 1:29 PM, > > wrote: > > > > So, to summarize. I can get Camel to eval the Expression bean when using > > testExpression in a setHeader. But I can't get Camel to eval it > > as part of another

Re: Store un-evaluated simple expression, and evaluate on use?

2016-04-15 Thread Claus Ibsen
On Fri, Apr 15, 2016 at 1:29 PM, wrote: > OK, thanks. Now the test with the header works. But I still can't get the > "inline" expression to work, in the tag. How should I write there? I > have tried: > > > > > But this just prints: > > Test 2: ${file:name.noext}_${date:now:-MM-dd_HH.mm.

RE: Store un-evaluated simple expression, and evaluate on use?

2016-04-15 Thread jimi.hullegard
OK, thanks. Now the test with the header works. But I still can't get the "inline" expression to work, in the tag. How should I write there? I have tried: But this just prints: Test 2: ${file:name.noext}_${date:now:-MM-dd_HH.mm.ss} Test 3: $ref{testExpression} So, to summarize. I can

Re: Store un-evaluated simple expression, and evaluate on use?

2016-04-15 Thread Claus Ibsen
Ah yeah use instead of On Fri, Apr 15, 2016 at 11:31 AM, wrote: > I can't get it to work. > > This is my config: > > class="org.apache.camel.language.simple.SimpleLanguage" > factory-method="simple"> > value="${file:name.noext}_${date:now:-MM-dd_HH.mm.ss}" /> > > > > >

Re: Multiple camel producers instantiated

2016-04-15 Thread Shiva
I am using Apache camel - 2.15.5 and Activemq - 5.10.2 Below is the code for my route // Define heartbeat routes for (final EndpointInfo endpointInfo : endpointInfos) { final String uri = BOLD_ENDPOINT_PREFIX + endpointInfo.getUri(); from("timer:monitor" + uri + "?fixedRate=tr

Catch-All for (Sub-) Route Exception Handling

2016-04-15 Thread ritterda
Hello, I am analyzing the exception handling capabilities of Apache Camel (v2.16.x) and was wondering whether it is possible to propagate exceptions from a subroute (B; e.g., "from:direct") to the calling route (A; e.g., "to:direct") without setting ".errorHandler(noErrorHandler())". A: from(..)

Re: Multiple camel producers instantiated

2016-04-15 Thread Charles Moulliard
Hi Shiva, Can you share the code/test case in order to reproduce the issue please ? Which camel component do you use ? Which camel version ? Regards, On Fri, Apr 15, 2016 at 11:51 AM, Shiva wrote: > Hi, > > I am using Camel and I have an issue that multiple instances of the Default > producer

Multiple camel producers instantiated

2016-04-15 Thread Shiva
Hi, I am using Camel and I have an issue that multiple instances of the Default producer is being created suddenly. Normally when I start the camel route, only one instance of the producer is created as expected. It works fine for a few hours sending messages to the endpoint. But after a while, a

RE: Store un-evaluated simple expression, and evaluate on use?

2016-04-15 Thread jimi.hullegard
I can't get it to work. This is my config: [...] ref:testExpression [...] And this is the output: Test 1: ${file:name.noext}_${date:now:-MM-dd_HH.mm.ss} Test 2: ${file:name.noext}_${date:now:-MM-dd_HH.mm.ss} Bu

Re: Store un-evaluated simple expression, and evaluate on use?

2016-04-15 Thread Claus Ibsen
In Java code you can store anything in the registry, and also in xml but using style and call the static simple method on the language And then you can refer to the expression using xxx Or if using simple ref:xxx An alternative is to use property placeholders http://camel.apache.org/u

Store un-evaluated simple expression, and evaluate on use?

2016-04-15 Thread jimi.hullegard
Hi, Is it possible to define a simple expression in some global variable, without evaluating it? And then reference it, and evaluate it, later? I'm using Camel Spring XML. For example, something like this pseudo config: [...] ${testExpression} [...] Can this be