Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Not A Problem
-
5.6.0
-
None
-
None
Description
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:
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; } })); }
And in createBroker() method change the setDestinations line to:
broker.setDestinations(new ActiveMQDestination[] {queue, new ActiveMQTempQueue("TEMP-QUEUE")});
Workaround:
set broker.setAllowTempAutoCreationOnSend(true); however I'd expect the temp queues to be GCd without this setting.