Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 926719BFC for ; Fri, 3 Aug 2012 13:07:03 +0000 (UTC) Received: (qmail 50320 invoked by uid 500); 3 Aug 2012 13:07:03 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 50108 invoked by uid 500); 3 Aug 2012 13:07:03 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 49810 invoked by uid 99); 3 Aug 2012 13:07:02 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2012 13:07:02 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id C883514284D for ; Fri, 3 Aug 2012 13:07:02 +0000 (UTC) Date: Fri, 3 Aug 2012 13:07:02 +0000 (UTC) From: "Timothy Bish (JIRA)" To: dev@activemq.apache.org Message-ID: <1937119873.10116.1343999222825.JavaMail.jiratomcat@issues-vm> In-Reply-To: <236071295.5508.1343918823288.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (AMQ-3957) Temporary queues are not being garbage collected. (unit test included) 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/AMQ-3957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13428060#comment-13428060 ] Timothy Bish commented on AMQ-3957: ----------------------------------- The temp destination is bound to the lifetime of the connection that created it. If you close the connection then the the temp queue will be cleaned up. If you want the broker to remove them then you need to enable 'allowTempAutoCreationOnSend'. The default behavior is matching the expect behavior of JMS temp destinations and Connection lifetime. > Temporary queues are not being garbage collected. (unit test included) > ---------------------------------------------------------------------- > > Key: AMQ-3957 > URL: https://issues.apache.org/jira/browse/AMQ-3957 > Project: ActiveMQ > Issue Type: Bug > Affects Versions: 5.6.0 > Reporter: Andrejs Jermakovics > Labels: garbage, inactivity, temp, unit-test > > Temporary queues are not being garbage collected even if garbage collection is specified in destination policy. > *To reproduce:* > Add the following unit test to {{DetinationGCTest}}: > {code} > public void testTempQueueGc() throws Exception { > assertEquals(1, broker.getAdminView().getTemporaryQueues().length); > assertTrue("After GC runs temporary queue should be deleted.", Wait.waitFor(new Condition() { > @Override > public boolean isSatisified() throws Exception { > return broker.getAdminView().getTemporaryQueues().length == 0; > } > })); > } > {code} > And in {{createBroker()}} method change the setDestinations line to: > {code} > broker.setDestinations(new ActiveMQDestination[] {queue, new ActiveMQTempQueue("TEMP-QUEUE")}); > {code} > *Workaround:* > set {{broker.setAllowTempAutoCreationOnSend(true);}} however I'd expect the temp queues to be GCd without this setting. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira