Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 19333 invoked from network); 27 Oct 2010 13:15:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Oct 2010 13:15:06 -0000 Received: (qmail 8194 invoked by uid 500); 27 Oct 2010 13:15:06 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 8092 invoked by uid 500); 27 Oct 2010 13:15:06 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 8083 invoked by uid 99); 27 Oct 2010 13:15:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Oct 2010 13:15:05 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [88.175.101.52] (HELO christianhoffmann.info) (88.175.101.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Oct 2010 13:14:59 +0000 Received: from localhost (localhost [127.0.0.1]) by christianhoffmann.info (Postfix) with ESMTP id EAD54603F for ; Wed, 27 Oct 2010 15:14:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at christianhoffmann.info Received: from christianhoffmann.info ([127.0.0.1]) by localhost (christianhoffmann.info [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u0PU4K5nvUXr for ; Wed, 27 Oct 2010 15:14:34 +0200 (CEST) Received: from christianhoffmann.info (localhost [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: chris) by christianhoffmann.info (Postfix) with ESMTPSA id 4C2BECA9 for ; Wed, 27 Oct 2010 15:14:33 +0200 (CEST) MIME-Version: 1.0 Date: Wed, 27 Oct 2010 15:14:33 +0200 From: chris To: Subject: contradictory patch of ConduitBridge for removing of subscriptions Message-ID: X-Sender: email@christianhoffmann.info User-Agent: RoundCube Webmail/0.2.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Hi, I noticed that in 5.3.2 the removal of a consumer in a network of brokers sometimes triggers the removal of the network bridged subscription even though there are still some other running consumers. The problem was resolved in 5.4 with revision 949742 to handle AMQ-2754. But looking at the code, this revision seems to undo a fix for a memory leak that has been done earlier: revision 902009 for AMQ-2530. I wonder if with the actual code, we're now back to the situation where conduit bridge "works" but with memory leak. Rgds, Chris PS: The following patch for 5.3.2 might do the trick, but I guess this needs some verification from someone who knows what this is supposed to do: --- a/activemq-core/src/main/java/org/apache/activemq/network/ConduitBridge.java Mon Oct 04 11:32:53 2010 +0200 +++ b/activemq-core/src/main/java/org/apache/activemq/network/ConduitBridge.java Tue Oct 26 18:56:17 2010 +0200 @@ -96,7 +96,6 @@ @Override protected void removeDemandSubscription(ConsumerId id) throws IOException { - super.removeDemandSubscription(id); List tmpList = new ArrayList(); for (Iterator i = subscriptionMapByLocalId.values().iterator(); i.hasNext();) { @@ -112,7 +111,7 @@ } for (Iterator i = tmpList.iterator(); i.hasNext();) { DemandSubscription ds = i.next(); - removeSubscription(ds); + super.removeDemandSubscription(ds.getRemoteInfo().getConsumerId()); if (LOG.isDebugEnabled()) { LOG.debug(configuration.getBrokerName() + " removing sub on " + localBroker + " from " + remoteBrokerName + " : " + ds.getRemoteInfo()); }