[ 
https://issues.apache.org/jira/browse/ARTEMIS-1419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16164699#comment-16164699
 ] 

ASF GitHub Bot commented on ARTEMIS-1419:
-----------------------------------------

Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1532#discussion_r138630255
  
    --- Diff: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java
 ---
    @@ -1585,6 +1586,47 @@ public void testXAResourceRolledBackRemoved() throws 
Exception {
           assertNull(transaction);
        }
     
    +   @Test
    +   public void testTempQueueLeak() throws Exception {
    +      final Connection[] connections = new Connection[20];
    +
    +      try {
    +         for (int i = 0; i < connections.length; i++) {
    +            connections[i] = factory.createConnection();
    +            connections[i].start();
    +         }
    +
    +         Session session = connections[0].createSession(false, 
Session.AUTO_ACKNOWLEDGE);
    +
    +         for (int i = 0; i < connections.length; i++) {
    +            TemporaryQueue temporaryQueue = session.createTemporaryQueue();
    +            temporaryQueue.delete();
    +         }
    +
    +         Object[] addressResources = 
server.getManagementService().getResources(AddressControl.class);
    +         AddressControl addressControl = null;
    +
    +         for (Object addressResource : addressResources) {
    +
    +            if (((AddressControl) 
addressResource).getAddress().equals("ActiveMQ.Advisory.TempQueue")) {
    +               addressControl = (AddressControl) addressResource;
    +            }
    +         }
    +
    +         assertNotNull("addressControl for temp advisory", addressControl);
    +
    +         //sleep a bit to allow message count to go down.
    +         Thread.sleep(50);
    --- End diff --
    
    Instead of this... please use Wait.waitFor() ?


> OpenWire advisory message never deleted
> ---------------------------------------
>
>                 Key: ARTEMIS-1419
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1419
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: OpenWire
>    Affects Versions: 2.3.0
>            Reporter: Howard Gao
>            Assignee: Howard Gao
>             Fix For: 2.4.0
>
>
> By default, every openwire connection will create a queue under the multicast 
> address ActiveMQ.Advisory.TempQueue. If a openwire client is create temporary 
> queues these queues will fill up with messages for as long as the associated 
> openwire connection is alive. It appears these messages do not get consumed 
> from the queues.
> The reason behind is that advisory messages don't require acknowledgement so 
> the messages stay at the queue. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to