michaelandrepearce commented on a change in pull request #2794: ARTEMIS-2451 limit size of destination cache URL: https://github.com/apache/activemq-artemis/pull/2794#discussion_r313765154
########## File path: tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/TemporaryDestinationTest.java ########## @@ -266,6 +266,24 @@ public void testForTempQueueTargetInfosSizeLimit() throws Exception { } } + @Test + public void testForKnownAddressSizeLimit() throws Exception { + try { + conn = createConnection(); + Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); + for (int i = 0; i < 200; i++) { + TemporaryQueue temporaryQueue = s.createTemporaryQueue(); + MessageProducer producer = s.createProducer(temporaryQueue); + producer.send(s.createMessage()); + } + assertTrue(((ActiveMQConnection)conn).getKnownDestinations().size() <= 100); Review comment: ive very quickly tried to code up what im trying to explain here: https://github.com/apache/activemq-artemis/pull/2796 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services