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

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

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

    https://github.com/apache/activemq-artemis/pull/672#discussion_r72420605
  
    --- Diff: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SlowConsumerTest.java
 ---
    @@ -115,6 +119,40 @@ public void testSlowConsumerKilled() throws Exception {
        }
     
        @Test
    +   public void testDisableSlowConsumerReconnectWithKilled() throws 
Exception {
    +      ClientSessionFactory sf = createSessionFactory(locator);
    +
    +      ClientSession session = addClientSession(sf.createSession(false, 
true, true, false));
    +
    +      session.createQueue(QUEUE, QUEUE, null, false);
    +
    +      ClientProducer producer = 
addClientProducer(session.createProducer(QUEUE));
    +
    +      final int numMessages = 25;
    +
    +      for (int i = 0; i < numMessages; i++) {
    +         producer.send(createTextMessage(session, "m" + i));
    +      }
    +
    +      ClientConsumer consumer = 
addClientConsumer(session.createConsumer(QUEUE));
    +      session.start();
    +
    +      Thread.sleep(3000);
    +
    +      RemotingService service = server.getRemotingService();
    +      Set<RemotingConnection> connections = service.getConnections();
    +      assertEquals(true, connections.isEmpty());
    +
    +      if (sf instanceof ClientSessionFactoryImpl) {
    +         int reconnectAttemps = 
((ClientSessionFactoryImpl)sf).getReconnectAttempts();
    +         assertEquals(0, reconnectAttemps);
    +      }
    +      else {
    +         throw new ActiveMQException();
    --- End diff --
    
    why not `fail()` with the reason?


> Disable slow client reconnecting with KILL slow client policy
> -------------------------------------------------------------
>
>                 Key: ARTEMIS-642
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-642
>             Project: ActiveMQ Artemis
>          Issue Type: New Feature
>    Affects Versions: 1.3.0
>            Reporter: Chen Maoqian
>            Priority: Minor
>
> It is possible to detect and handle(KILL, NOTIFY) slow consumers. In case 
> policy KILL is used and connection factory used to create connection of slow 
> consumer has attribute reconnect-attempts set to "-1", slow consumer 
> reconnects to server. This consumer is then reconnects, is detected as slow 
> and disconnected. 
> Attribute reconnect-attempts="-1" should be ignored, and slow client should 
> not be trying to reconnect once it is disconnected by KILL slow consumer 
> policy.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to