Re: Error handler to both logger and dead letter queue?

2014-03-28 Thread Rural Hunter
oh, got it. thanks. 于 2014/3/28 13:59, Claus Ibsen 写道: The caused exception is stored as a property on the Exchange. See more details http://camel.apache.org/why-is-the-exception-null-when-i-use-onexception.html On Fri, Mar 28, 2014 at 6:31 AM, Rural Hunter wrote: I checked the doc and it

Re: Error handler to both logger and dead letter queue?

2014-03-27 Thread Rural Hunter
I checked the doc and it seems only log the exchange but I actually want the exception/error. 于 2014/3/27 18:43, Chirag Dewan 写道: Hi, You can try the log component. http://camel.apache.org/log.html BR, Chirag

Error handler to both logger and dead letter queue?

2014-03-25 Thread Rural Hunter
Hi, I configured the error handler to send messages causing error to dead letter queue. I noticed when the message went to the dead letter queue, there is no error in the log. In this case, it's very hard for me to know what's the problem with those messages. Is it possible for the error hand

Re: Processor threading model question

2014-02-26 Thread Rural Hunter
Thanks. This did the trick. I was not aware of this. 于 2014/2/26 17:24, Claus Ibsen 写道: activemq extends the jms component, so it has all the options from jms too.

Re: Processor threading model question

2014-02-26 Thread Rural Hunter
It's an activemq queue with url like this: NEW_QUEUE=activemq:queue:new_queue I use activemq comp instead of jms comp as suggested by the doc. Is there similar option for activemq comp? or I should use jms comp? 于 2014/2/26 14:57, Claus Ibsen 写道: is NEW_QUEUE a jms queue? If so you can use co

Re: Processor threading model question

2014-02-25 Thread Rural Hunter
Hi, I implemented this but I'm facing severe performance problem. My legacy application handles this by separated threads and the performance is more than 10 times of my Camel application. I don't know if it's my Camel application problem or it's the problem of Camel. Here the detail of my ap

Re: Use activemq connection pool without spring?

2014-02-25 Thread Rural Hunter
Got it. Thanks. 于 2014/2/25 16:05, Claus Ibsen 写道: Yeah check the source code of unit tests for camel-jms

Re: Use activemq connection pool without spring?

2014-02-25 Thread Rural Hunter
Thanks. I know how to create a ConnectionFactory. My question is how to use it with ActiveMQComponent. Is there some code sample? 于 2014/2/25 15:31, Claus Ibsen 写道: Hi Yeah you can setup the pooling using java code. The unit tests of camel-jms does that etc. https://github.com/apache/camel/bl

Use activemq connection pool without spring?

2014-02-24 Thread Rural Hunter
Hi, I read the activemq component doc here: http://camel.apache.org/activemq. It desribes how to use connection pool with Spring support. Is it possible to use this connection pool without Spring? I didn't find anything about this in the doc.

Re: Processor threading model question

2014-02-21 Thread Rural Hunter
Good idea, will try that. Thanks a lot! 于 2014/2/21 17:18, Henryk Konsek 写道: Hi, The main problem is on my processors threading model. I read the doc and it describes that most processors should be singleton. But in my case my processor can not be singleton because it depends on some non-threa

Processor threading model question

2014-02-20 Thread Rural Hunter
Hi, I have a Camel application design question. My requirement is as following: 1. The data source is from an activemq queue 2. the data is processed by serveral different processors in a row 3. the data is stored in database finally. The main problem is on my processors threading model. I read

Re: NullPointerException in FileInputStreamCache

2014-02-13 Thread Rural Hunter
stream overflows from memory to disk, and somewhere on the way the temporary file to use for disk overflow is null. http://camel.apache.org/stream-caching On Thu, Feb 13, 2014 at 9:29 AM, Rural Hunter wrote: It's like this: from(NEW_QUEUE).unmarshal().json(JsonLibrary.Gson, IndexDoc.

Re: NullPointerException in FileInputStreamCache

2014-02-13 Thread Rural Hunter
It's like this: from(NEW_QUEUE).unmarshal().json(JsonLibrary.Gson, IndexDoc.class) .process(new Processor1()) .process(new Processor2()) .process(new Processor3()) .process(new Processor4()) .process(new Processor5()) .process(new Processor6()).wireTap(MY_STORE) .marshal().json(JsonLibrary.Gson).t

Re: Camel swallows Error

2014-02-12 Thread Rural Hunter
Yes, I'm trying to isolate the test case but it's a bit hard. In most situation I see the good stack trace. 于 2014/2/12 16:17, Willem Jiang 写道: I think you need share us with your test case, it could be more easy for us to dig the issue. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.c

NullPointerException in FileInputStreamCache

2014-02-12 Thread Rural Hunter
Hi, I'm using Camel 2.12.2 and enabled stream caching with this code: context.setStreamCaching(true); Sometimes I got NullPointerException related to stream cache: Stacktrace

Re: Camel swallows Error

2014-02-11 Thread Rural Hunter
2.12.2 于 2014/2/12 11:31, Willem Jiang 写道: The default value is true, BTW, which version of Camel are you using? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com(http://jnn.javaeye.c

Re: Camel swallows Error

2014-02-11 Thread Rural Hunter
hmm...I didn't set it manually. Is that default to false? 于 2014/2/12 10:21, Willem Jiang 写道: I just checked the code and found an interesting thing. public class DefaultSpringErrorHandler implements ErrorHandler { private final LoggingExceptionHandler handler; private final boolean

Re: Camel swallows Error

2014-02-11 Thread Rural Hunter
Sorry for late response. I was in vacation. I ran your test and checked the stack trace output and found some difference with the one I got problem. Stacktrace with your test: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: Hello

Re: Camel 2.12.2 crashes on activemq restart

2014-02-07 Thread Rural Hunter
Anyone?

Re: Camel swallows Error

2014-01-29 Thread Rural Hunter
Yes, your test case is working. I will try to find the difference with my case. 于 2014/1/29 17:01, Claus Ibsen 写道: Did some unit tests which cannot reproduce the issue you see. https://github.com/apache/camel/commit/8cd86620d09f9641f4d29c5a131f162fd48ec547

Re: Camel swallows Error

2014-01-29 Thread Rural Hunter
I don't have the log any more. And I think I described the problem clearly. What do you need the log for? 于 2014/1/29 15:54, Charles Moulliard 写道: Can you create a gist link with the full stack trace please ? Otherwise we cannot help you

Re: Camel 2.12.2 crashes on activemq restart

2014-01-29 Thread Rural Hunter
No, as I said, camel crashed with that error. I had to restart camel. 于 2014/1/29 16:00, Willem Jiang 写道: This warning messages are expected. Does the camel route work again when the ActiveMQ server is back online ? --

Re: Camel 2.12.2 crashes on activemq restart

2014-01-29 Thread Rural Hunter
Of coz I can. The error occurred during activemq restarting and then camel crashed. After activemq is restarted, I had to restart my camel application since it crashed during the activemq restarting. 于 2014/1/29 15:57, Charles Moulliard 写道: The problem is not related to Camel. Can you make a J

Camel 2.12.2 crashes on activemq restart

2014-01-28 Thread Rural Hunter
Hi, My route is quite simple: from(REQUEST_QUEUE).process(processor1).process(processor2).process(processor3).to(COMPLETE_QUEUE) REQUEST_QUEUE and COMPLETE_QUEUE are both activemq queues. It runs fine normaly. But when I restart activmq, I found my Camel application just exited with this log:

Re: Camel swallows Error

2014-01-28 Thread Rural Hunter
I didn't keep the log but it's a normal NoClassDefFoundError with clear stack trace. It indicated the line in my processor which caused the error. The route is quite simple like this: from(REQUEST_QUEUE).process(processor1).process(processor2).process(processor3).to(COMPLETE_QUEUE) The error occ

Camel swallows Error

2014-01-28 Thread Rural Hunter
Hi, I use camel 2.12.2 and created a processor. When I deploy the application I got vague error messages in log like this: Stacktrace --- org.apache.camel.CamelExe

Re: Why Json Marshal to activemq is BytesMessage?

2014-01-28 Thread Rural Hunter
Should it be default to TextMessage for json? 于 2014/1/28 20:15, Claus Ibsen 写道: I would assume the json data format marshall into a byte array / byte input stream. And therefore its mapped as bytes when sent to JMS.

Why Json Marshal to activemq is BytesMessage?

2014-01-28 Thread Rural Hunter
Hi, I'm using camel 2.12.2 with this route: marshal().json(JsonLibrary.Gson).to("activemq:queue:completed") When I process the message in other application, I found the message in the queue is BytesMessage instead of expected TextMessage. I have to force it to TextMessage by adding paramet