Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 62826 invoked from network); 26 Mar 2009 13:44:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Mar 2009 13:44:06 -0000 Received: (qmail 40217 invoked by uid 500); 26 Mar 2009 13:44:05 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 40190 invoked by uid 500); 26 Mar 2009 13:44:05 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 40180 invoked by uid 500); 26 Mar 2009 13:44:05 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 40177 invoked by uid 99); 26 Mar 2009 13:44:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Mar 2009 13:44:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Mar 2009 13:44:05 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7264F234C044 for ; Thu, 26 Mar 2009 06:43:44 -0700 (PDT) Message-ID: <810761061.1238075024467.JavaMail.jira@brutus> Date: Thu, 26 Mar 2009 06:43:44 -0700 (PDT) From: "Claus Ibsen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Issue Comment Edited: (CAMEL-1461) A request route with a topic node incurs a 20 second wait and refers to the wrong MEP. In-Reply-To: <2062959007.1237227399946.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50772#action_50772 ] Claus Ibsen edited comment on CAMEL-1461 at 3/26/09 6:42 AM: ------------------------------------------------------------- Fixed now. The disableReplyTo is now not needed. trunk: r757693, 757730, 758617 1.x: 757728, 758638 was (Author: davsclaus): Fixed now. The disableReplyTo is now not needed. trunk: r757693, 757730, 758617 1.x: 757728 > A request route with a topic node incurs a 20 second wait and refers to the wrong MEP. > -------------------------------------------------------------------------------------- > > Key: CAMEL-1461 > URL: https://issues.apache.org/activemq/browse/CAMEL-1461 > Project: Apache Camel > Issue Type: Bug > Components: camel-jms > Affects Versions: 1.6.0 > Environment: ActiveMQ/Camel > Reporter: Michael Chen > Assignee: Claus Ibsen > Fix For: 2.0.0, 1.6.1 > > > If a route contains a node that publishes to a topic, the route is incorrectly suspended for a default 20 seconds at the topic node. Further, JmsProducer.java checks the MEP of the original request Exchange and not the endpoint of the topic. > For example, say I have a route built like this: > {code} > from("activemq:queue:request"). > to("generate_news"). > to("activemq:topic:news"). > to("do_something_else"); > {code} > The original request is expecting a reply. However, after the "news" is pumped into the news topic, there is a default 20 second wait (requestTimeout). This wait always results in the exception: "The OUT message was not received within: 20000 millis on the exchange..." > After reading the JmsProducer code, I changed the route to the following: > {code} > from("activemq:queue:request"). > to("generate_news"). > to("activemq:topic:news?exchangePattern=InOnly"). > to("do_something_else"); > {code} > This reveals the root of the bug, which is in the first few lines of method org.apache.camel.component.jms.JmsProducer.process(Exchange): > {code}// > public void process(final Exchange exchange) { > final org.apache.camel.Message in = exchange.getIn(); > if (exchange.getPattern().isOutCapable()) { > {code} > The above if statement checks the MEP of the original request's Exchange and not the new endpoint of the news topic. This makes the above "?exchangePattern=InOnly" configuration useless, because the original request MEP is InOut. The result is that after that 20 second time-out, the temporary queue for the original request has expired, so the whole request failed. Note that the next node "do_something_else" is never reached due to the time-out exception. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.