You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by rinilnath r <ri...@gmail.com> on 2020/08/14 10:07:29 UTC
Camel context is created 3 times for a web app
Hi,
I am seeing that camel context is being created multiple times (3 times)
parallely when deploying and running the web app in tomcat 9.
Web Application tech stack details
Spring 5
tomcat 9
Camel.: 2.x
Quartz: 1.8.6
Java 1.8
Camel context names in log im seeing as camel-1, camel-2, camel-3 each with
10 threads in itself.
Please let me know if there is any root cause behind this. ?
Thanks and Regards,
Rinilnath. R
Cell # +91-9786285451
Re: deadletterchannel
Posted by Bing Lu <mf...@yahoo.com.INVALID>.
thank you very much, gonna try this.
On Saturday, August 15, 2020, 10:40:29 AM EDT, Mikael Andersson <mi...@protonmail.com.invalid> wrote:
We use this:
errorHandler(deadLetterChannel("{{jms.queue.dead}}")
.logHandled(true)
.maximumRedeliveries(0)
.disableRedelivery()
.logExhaustedMessageBody(true)
.logExhaustedMessageHistory(true)
.useOriginalMessage()
.log("Error logged in File Importer")
.onPrepareFailure(exchange -> {
final Exception cause = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class);
log.error("Error occurred in File Importer", cause);
exchange.getIn().setHeader("FailedBecause", cause.getMessage());
exchange.getIn().setHeader("CamelJmsMessageType", JmsMessageType.Text);
})
);
_____
/M
Sent with ProtonMail Secure Email.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Saturday 15 August 2020 kl. 16:20, Bing Lu <mf...@yahoo.com.INVALID> wrote:
> what options do i need to use on deadletterchannel so the messages going there show both original message as well as the caught exception and stacktrace? thanks
Re: deadletterchannel
Posted by Mikael Andersson <mi...@protonmail.com.INVALID>.
We use this:
errorHandler(deadLetterChannel("{{jms.queue.dead}}")
.logHandled(true)
.maximumRedeliveries(0)
.disableRedelivery()
.logExhaustedMessageBody(true)
.logExhaustedMessageHistory(true)
.useOriginalMessage()
.log("Error logged in File Importer")
.onPrepareFailure(exchange -> {
final Exception cause = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class);
log.error("Error occurred in File Importer", cause);
exchange.getIn().setHeader("FailedBecause", cause.getMessage());
exchange.getIn().setHeader("CamelJmsMessageType", JmsMessageType.Text);
})
);
_____
/M
Sent with ProtonMail Secure Email.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Saturday 15 August 2020 kl. 16:20, Bing Lu <mf...@yahoo.com.INVALID> wrote:
> what options do i need to use on deadletterchannel so the messages going there show both original message as well as the caught exception and stacktrace? thanks
deadletterchannel
Posted by Bing Lu <mf...@yahoo.com.INVALID>.
what options do i need to use on deadletterchannel so the messages going there show both original message as well as the caught exception and stacktrace? thanks