Camel cache consumer (event based)

2013-07-21 Thread rrajen2
Hi I have a Camel cache producer built using EHCache. I was wondering if I want a event-based Cache consumer to consume from it, how would I be able to do it? Assume I have a Cache named cache://testCache with its producer built. Please share sample code demonstrating a event based consumer from t

Re: camel error with simple program with camel-core-2.11.1.jar

2013-07-21 Thread vinay
update.. I get following warning when starting camel... WARNING: Module [camel-groovy] - Unable to load extension class [class org.apach e.camel.groovy.extend.CamelGroovyMethods] due to [org/apache/camel/Expression]. Maybe this module is not supported by your JVM version. regards

Re: Camel HTTP component vs. Apache HTTP client

2013-07-21 Thread Willem Jiang
It makes sense that camel has lots of things to do beside processing the message as you do with HttpClient. Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/

Re: After camelContext shutdown, is any way to exit the Java main() method?

2013-07-21 Thread Willem Jiang
As you are using camel main to start the camel context. You need to call the System.exit() when the Camel context is stopped. Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemji

Re: Camel HTTP component vs. Apache HTTP client

2013-07-21 Thread humayun0156
my xml files are not more than 5kb and i don't want to cache them. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-HTTP-component-vs-Apache-HTTP-client-tp5735943p5735995.html Sent from the Camel - Users mailing list archive at Nabble.com.

After camelContext shutdown, is any way to exit the Java main() method?

2013-07-21 Thread bonnahu
Hi guys, I got another question here. I start my camelContext in the main(), then in the route, I stop the camelContext in a Processor. Now I can see the camelContext is shutdown gracefully. However, the Java application is still running. My question is that whether there is a way to exit the Java

Re: Message Processing Performance while splitting

2013-07-21 Thread Willem Jiang
When you add more processors into the route, camel need to do lots of addition work to handle the message. If you want a good performance, you should use the Java code to do the loop in a single method. But it could be good method for us find the hot spots the performance those camel introduces.

Re: camel error with simple program with camel-core-2.11.1.jar

2013-07-21 Thread vinay
Hi Claus, Sorry about the delayed response I tried, adding "{Exchange it -> .}" but didn't worked. .process ({ Exchange it -> println "in processor: ${it.in.body}" it.out.body = it.in.body.toUpperCase() } ) following works... .process ({ Excha

Re: Camel HTTP component vs. Apache HTTP client

2013-07-21 Thread Willem Jiang
Do you know what's the size of the XML file? Camel will try to cache the XML input stream into a file if the input stream size is big than 64K. You can set the size bigger to avoid caching the input stream into a file by setting the properties in CamelContext like context.getProperties().put(Cached

Re: fw: hello

2013-07-21 Thread Jon Anstey
Please don't click this link. Some hacker in Belarus hijacked my account today and sent this out. Cheers, Jon On 2013-07-21 2:23 PM, "Jon Anstey" wrote: > http://personeelsservice-kwb.nl/tcxfv/hniyxuwxstblt > > > > > > > > > > > > > > > janstey > > > > > > > > > > > > > > > > 7/21/2013 5:52:2

Re: Why cannot do a graceful shutdown?

2013-07-21 Thread bonnahu
Hey Bilgin, Thanks for your reply. It works for me! -- View this message in context: http://camel.465427.n5.nabble.com/Why-cannot-do-a-graceful-shutdown-tp5735962p5735987.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Message Processing Performance while splitting

2013-07-21 Thread Claus Ibsen
Hi You cant really compare the 2 approaches. In the pure java code you just have a for loop in a single method which is as fast as you can go. When using Camel routes and the EIPs then a lot more goes on under the hood. On Sun, Jul 21, 2013 at 10:12 PM, Viktor Kubinec wrote: > Thanks Willem. >

Re: Mocking consumer endpoints

2013-07-21 Thread Bilgin Ibryam
Then I think I method like the following in CamelTestSupport public void replaceRouteFromWith(String routeId, String fromEndpoint) { fromEndpoints.put(routeId, fromEndpoint); } and some additions to doSetUp() for (final Map.Entry entry : fromEndpoints.entrySet()) {

Re: Message Processing Performance while splitting

2013-07-21 Thread Viktor Kubinec
Thanks Willem. I've created custom splitter, which is using BufferedReader, just as you suggested. It has improved the performance a bit but it is still much slower (10-20x) than the java code that I posted. I have spent bit more time investigating this problem. The code (with documentation on how

RE: New Instance of CamelContext from Spring

2013-07-21 Thread SyedBhai
Dear Bilgin, That really really helped. Atlast, I found what I wanted. Thanks very much. Syed. Date: Sun, 21 Jul 2013 09:53:55 -0700 From: ml-node+s465427n5735973...@n5.nabble.com To: syedahmed.c...@hotmail.com Subject: Re: New Instance of CamelContext from Spring CamelContextFactor

Re: Camel Consumer in JAX-RS Web Service

2013-07-21 Thread Sergey Beryozkin
Can you add a final component to that mail route which will simply notify this ReadMail resource that the route is done ? Sergey On 21/07/13 17:16, traviskds wrote: I find Camel easy for difficult use cases but hard to simple use cases. Or maybe I haven't still mastered it. I have a JAX-RS web

Re: Camel HTTP component vs. Apache HTTP client

2013-07-21 Thread humayun0156
i've used http4 component and test my code. but it still took 600-800 ms per request. my route looks like : from("direct:npGet") .setHeader(Exchange.HTTP_METHOD, constant("GET")) .setProperty("url", simple("${body}")) .setHeader(Exchange.HTTP_URI, sim

Re: New Instance of CamelContext from Spring

2013-07-21 Thread Bilgin Ibryam
CamelContextFactoryBean creates CamelContext as a singleton and its reference is cached by Spring. It might be easier for you if you a factory for creating new CamelContext and you prefer you can still reuse the same route definitions from Spring XML in each new CamelContext. Something like this:

fw: hello

2013-07-21 Thread Jon Anstey
http://personeelsservice-kwb.nl/tcxfv/hniyxuwxstblt janstey 7/21/2013 5:52:25 PM

Camel Consumer in JAX-RS Web Service

2013-07-21 Thread traviskds
I find Camel easy for difficult use cases but hard to simple use cases. Or maybe I haven't still mastered it. I have a JAX-RS web service that when executed, will dynamically create a route that reads mail from an IMAP server and then gets processed via a bean. My problem is that I need to add Th

Re: createTopic "jms.GeneralTopic" is invalid

2013-07-21 Thread Claus Ibsen
Is the topic named "jms.SpecialTopic" or just "SpecialTopic" If the latter then try with from("wmq:topic:SpecialTopic").to("file:target/messages/others"); On Sat, Jul 20, 2013 at 2:33 PM, gliesian wrote: > And here is my route: > > from("wmq:topic:jms.SpecialTopic").to("file:target/messages/othe

Re: New Instance of CamelContext from Spring

2013-07-21 Thread SyedBhai
Nope, it did not help. Can someone share the answer please if you have? Thanks, Syed. -- View this message in context: http://camel.465427.n5.nabble.com/New-Instance-of-CamelContext-from-Spring-tp5735942p5735956.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel HTTP4, not able to use httpContext endpoint option

2013-07-21 Thread lmanchanda75
Hi, Following is the complete stracktrace: JBossFuse:karaf@root> org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: http4://172.16.1.100?authPassword=password&authUsername=username&httpClient.connectionTimeout=4000&httpClient.soTimeout=16000&httpContext=m essageBrokerA

Re: JMSExceptions:045101

2013-07-21 Thread gliesian
I don't have the option to change it... any other ideas? -- View this message in context: http://camel.465427.n5.nabble.com/JMSExceptions-045101-tp5735934p5735939.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Why cannot do a graceful shutdown?

2013-07-21 Thread Bilgin Ibryam
Hi, Have a look here http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html and use separate thread in your processor to shutdown the Camel HTH Bilgin On 21 July 2013 15:29, bonnahu wrote: > Hey guys, > I need to shutdown the camelcontext in a Processor. Here is what I am doing: >

Why cannot do a graceful shutdown?

2013-07-21 Thread bonnahu
Hey guys, I need to shutdown the camelcontext in a Processor. Here is what I am doing: http://camel.apache.org/schema/spring";> /order[@test] Here is the DownloadLogger Processor: public class DownloadLogger implements Processor {

Re: Camel HTTP component vs. Apache HTTP client

2013-07-21 Thread Raul Kripalani
Many thanks. As a first step, can you switch to the Camel HTTP4 component? With the current setup, you're comparing v3 vs. v4. Thanks, Raúl. On 21 Jul 2013 13:24, "humayun0156" wrote: > Here is my Apache HTTP client version to download a URL. all three files > are > here > Resource.java

Re: Camel HTTP component vs. Apache HTTP client

2013-07-21 Thread humayun0156
Here is my Apache HTTP client version to download a URL. all three files are here Resource.java DefaultHTTPClient.java XMLEntityParser Performance issue is very imporntat. we should decid

Re: How to recover corrupted HawtDB files

2013-07-21 Thread Raul Kripalani
> After all I use the great Camel framework to avoid building general-purpose functionality like this by myself. At Apache Camel we only offer a component to interact with HawtDB, but we're not responsible for the development nor tooling around that project. Sorry. Regards, Raúl. On 18 Jul 2013 0

Re: New Instance of CamelContext from Spring

2013-07-21 Thread Raul Kripalani
What exactly is your use case? Thanks, Raúl. On 21 Jul 2013 02:27, "SyedBhai" wrote: > Hi Guys, > I have configured camel context in a spring file. > Sample configuration is > http://camel.apache.org/schema/spring";> > > >uri="http://localhost:8080/AirpostDSP1/webres

Re: Camel HTTP component vs. Apache HTTP client

2013-07-21 Thread Raul Kripalani
Hi, Can you also post your other version with the Apache HTTP client only? I'd like to compare them to know where the performance hit is coming from. Thanks, Raúl. On 21 Jul 2013 06:10, "humayun0156" wrote: > from("direct:npGet") > .setHeader(Exchange.HTTP_METHOD, constant("GET