Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7DE43109B7 for ; Tue, 2 Jul 2013 05:53:37 +0000 (UTC) Received: (qmail 37675 invoked by uid 500); 2 Jul 2013 05:53:36 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 36766 invoked by uid 500); 2 Jul 2013 05:53:28 -0000 Mailing-List: contact issues-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 issues@camel.apache.org Received: (qmail 36719 invoked by uid 99); 2 Jul 2013 05:53:24 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jul 2013 05:53:24 +0000 Date: Tue, 2 Jul 2013 05:53:23 +0000 (UTC) From: "Devendra Khanolkar (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CAMEL-5832) camel-jms - JMS consumer should detect JMSReplyTo being sending to itself to avoid circular looping MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-5832?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Devendra Khanolkar updated CAMEL-5832: -------------------------------------- Attachment: JmsReplyToComponentEndlessLoopTest.java EndpointMessageListener.java JmsConfiguration.java G'day Claus, Please find the attached @EndpointMessageListener and @JmsConfiguration classes. My thinking is, we catch the trap set by the message sender (i.e. if the sender is trying to send us a msg and asking the JmsConsumer to reply back to the same queue, effectively creating an endless loop) at runtime. I couldnt find a way to determine this condition at route creation time, so had to put a check within the onMessage() method. Please ignore the old test that I attached at 14th of June. Attached is a new test which can help create a short lived endless loop. Let me know your thoughts. Thanks -Dev > camel-jms - JMS consumer should detect JMSReplyTo being sending to itself to avoid circular looping > --------------------------------------------------------------------------------------------------- > > Key: CAMEL-5832 > URL: https://issues.apache.org/jira/browse/CAMEL-5832 > Project: Camel > Issue Type: Improvement > Components: camel-jms > Affects Versions: 2.10.2 > Reporter: Claus Ibsen > Priority: Minor > Fix For: Future > > Attachments: EndpointMessageListener.java, JmsConfiguration.java, JmsReplyToComponentEndlessLoopTest.java, JmsReplyToComponentEndlessLoopTest.java > > > If people do something stupid to send a message to a queue which has a JMSReplyTo that goes back to the same queue, then that message would go in looping (endless). > We should maybe add some check for this, and add some option people can turn on|off this check. And if the check is enabled it would detect this and not send back a reply to itself. > There may be some odd use-cases where people send back reply messages to the same queue. And maybe have some dynamic router logic that can break the chain when done. -- 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