Raul Kripalani created CAMEL-5769: ------------------------------------- Summary: Camel JMS producer can block a thread under specific circumstances Key: CAMEL-5769 URL: https://issues.apache.org/jira/browse/CAMEL-5769 Project: Camel Issue Type: Bug Components: camel-jms Affects Versions: 2.10.2, 2.9.4, 2.8.6 Reporter: Raul Kripalani Assignee: Raul Kripalani Priority: Critical Fix For: 2.9.5, 2.10.3, 2.11.0
This is an edge case, but when the following circumstances concur, the asynchronous routing engine in Camel become blocked: - Sending an InOut exchange over JMS (request/reply), where: - Persistent messages are enabled (deliveryPersistent=true) - useMessageIDasCorrelationID is enabled - replyToType is Temporary queues (default) (using TemporaryQueueReplyManager) - a timeout is set You have to be really unlucky, but if the following condition is satisfied, a thread will become blocked: {{time the broker takes to ACK the produced message > message timeout}} Hence, if we have a timeout of 3000ms, and the broker takes 4000ms to ACK the message (e.g. slow Disk I/O while the journal is rotating - it happened to us), at some point we'll see this. {code} 2012-10-30 10:46:57,680 | WARN | CorrelationMap | 89 - org.apache.camel.camel-core - 2.8.0.fuse-06-11 | Exception occurred during purge task. This exception will be ignored. java.lang.NullPointerException {code} The CorrelationMap is rendered useless, so if subsequent exchanges time out, the ReplyHandler may never get an onTimeout callback, thus leading to the waiting thread getting blocked forever if the async routing engine was in place. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira