You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by majid <mo...@peerius.com> on 2015/03/10 14:39:21 UTC
Camel processor memory leak
Hi all,
I have a memory leak issue when I stop all my routes, I am still able to see
my processor in the memory snapshot :
public class ErrorHandlerProcessor implements org.apache.camel.Processor {
private Logger logger = Logger.getLogger(getClass());
@Override
public void process(Exchange exchange) throws Exception {
Throwable throwable = (Throwable)
exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
logger.error(throwable.getMessage());
}
}
I am using this processor in my route :
@Override
public void configure() throws Exception {
errorHandler(deadLetterChannel("seda:error"));
from("seda:error")
.process(errorHandlerProcessor).end();
}
does any one see an issue with this ?
ps: I know I can use loggingErrorHandler instead of this processor, but I
need more stuff to do in it, that's why I am using a seda queue.
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-processor-memory-leak-tp5763905.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel processor memory leak
Posted by majid <mo...@peerius.com>.
Hi All,
I fixed the issue.
Basically, when errorHandler(deadLetterChannel("seda:error")) is global to a
route, some mbeanserver.NamedObject is retaining a reference to the
processor.
I used instead
@Override
public void configure() throws Exception {
from("seda:error")
.errorHandler(deadLetterChannel("seda:error"))
.process(errorHandlerProcessor).end();
}
Is it an issue in Camel ? or should we use specific error handler only ?
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-processor-memory-leak-tp5763905p5763947.html
Sent from the Camel - Users mailing list archive at Nabble.com.