You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/06/01 17:18:00 UTC

[jira] [Work logged] (ARTEMIS-3234) Openwire Advisory messages are limited by prefetch in error

     [ https://issues.apache.org/jira/browse/ARTEMIS-3234?focusedWorklogId=604639&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-604639 ]

ASF GitHub Bot logged work on ARTEMIS-3234:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/Jun/21 17:17
            Start Date: 01/Jun/21 17:17
    Worklog Time Spent: 10m 
      Work Description: brusdev commented on pull request #3534:
URL: https://github.com/apache/activemq-artemis/pull/3534#issuecomment-852299514


   this is causing regression of ARTEMIS-2650, the following test can be used to check the regression:
   ```
      @Test
      public void testFailoverReceivingFromCore() throws Exception {
         final int prefetchSize = 10;
         final String text = "HelloWorld";
   
         sendMultipleTextMessagesUsingCoreJms(queueName, text, 100);
   
         //Initialize a failover connectionFactory.
         String urlString = "failover:(tcp://" + OWHOST + ":" + OWPORT + "?wireFormat.MaxInactivityDuration=5000)";
         ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(urlString);
         connectionFactory.setSendAcksAsync(false);
         connectionFactory.setOptimizeAcknowledge(false);
         connectionFactory.getPrefetchPolicy().setAll(prefetchSize);
   
         Connection connection = connectionFactory.createConnection();
         try {
            connection.setClientID("test.consumer.queue." + queueName);
            connection.start();
   
            Message message = null;
            Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
            Queue queue = session.createQueue(queueName);
            QueueControl queueControl = (QueueControl)server.getManagementService().
               getResource(ResourceNames.QUEUE + queueName);
            MessageConsumer consumer = session.createConsumer(queue);
   
            message = consumer.receive(5000);
            assertNotNull(message);
            assertTrue(message instanceof TextMessage);
            assertEquals(text + 0, ((TextMessage)message).getText());
            message.acknowledge();
   
            Wait.assertEquals(1L, () -> queueControl.getMessagesAcknowledged(), 3000, 100);
            Wait.assertEquals(prefetchSize, () -> queueControl.getDeliveringCount(), 3000, 100);
   
            message = consumer.receive(5000);
            assertNotNull(message);
            assertTrue(message instanceof TextMessage);
            assertEquals(text + 1, ((TextMessage)message).getText());
   
            //Force a disconnection.
            for (ServerSession serverSession : server.getSessions()) {
               if (session.toString().contains(serverSession.getName())) {
                  serverSession.getRemotingConnection().fail(new ActiveMQDisconnectedException());
               }
            }
   
            message.acknowledge();
   
            Wait.assertEquals(2L, () -> queueControl.getMessagesAcknowledged(), 3000, 100);
            Wait.assertEquals(prefetchSize, () -> queueControl.getDeliveringCount(), 3000, 100);
   
            message = consumer.receive(5000);
            assertNotNull(message);
            assertTrue(message instanceof TextMessage);
            assertEquals(text + 2, ((TextMessage)message).getText());
            message.acknowledge();
   
            System.err.println("id: " + message.getJMSMessageID());
   
            Wait.assertEquals(3L, () -> queueControl.getMessagesAcknowledged(), 3000, 100);
            Wait.assertEquals(prefetchSize, () -> queueControl.getDeliveringCount(), 30000, 100);
         } finally {
            connection.close();
         }
      }
   
   ```


-- 
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:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 604639)
    Time Spent: 0.5h  (was: 20m)

> Openwire Advisory messages are limited by prefetch in error
> -----------------------------------------------------------
>
>                 Key: ARTEMIS-3234
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3234
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: OpenWire
>    Affects Versions: 2.17.0
>            Reporter: Gary Tully
>            Assignee: Gary Tully
>            Priority: Major
>             Fix For: 2.18.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Advisory messages in excess of the prefetch will block pending credit, leading to buildup in the broker due to non dispatch.
> With the default temp destination advisory in the openwire client, when jms.watchTopicAdvisories=true - 1000 temp destinations will trigger the problem.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)