[ https://issues.apache.org/jira/browse/AMQ-7081?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Simon Lundstrom updated AMQ-7081: --------------------------------- Description: The fix of AMQ-7079 introduced a breaking change bug since the default value of {{maxSlowCount=-1}} was longer enough for {{abortSlowAckConsumerStrategy}} to just configure the slow consumer detection but it started to disconnect the consumer as well.\{{}} Setting {{maxSlowDuration="-1"}} doesn't disconnect the consumer though but I don't think we should change the old default behavior. Pre AMQ-7079 fix: {code:xml} <abortSlowAckConsumerStrategy checkPeriod="1000" maxTimeSinceLastAck="3000" maxSlowCount="-1" /> {code} worked before in just detecting a slow consumer. consumer was *not* disconnected. After AMQ-7079 fix: {code:xml} <abortSlowAckConsumerStrategy checkPeriod="1000" maxTimeSinceLastAck="3000" maxSlowCount="-1" /> {code} disconnects the consumer; ActiveMQ logs: {code:java} 2018-10-19 10:42:33,124 | INFO | aborting slow consumer: ID:kaka.it.su.se-53364-1539938520009-1:1:1:1 for destination:queue://su.it.linfra.simlu | org.apache.activemq.broker.region.policy.AbortSlowConsumerStrategy | ActiveMQ Broker[localhost] Scheduler 2018-10-19 10:42:50,250 | WARN | no matching consumer, ignoring ack null | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport: tcp:///127.0.0.1:53365@61616 2018-10-19 10:42:50,257 | WARN | Async error occurred: java.lang.IllegalStateException: Cannot remove a consumer that had not been registered: ID:kaka.it.su.se-53364-1539938520009-1:1:1:1 | org.apache.activemq.broker.TransportConnection.Service | ActiveMQ Transport: tcp:///127.0.0.1:53365@61616 {code} Spring Boot logs: {code:java} 2018-10-19 10:42:00.209 INFO 65846 --- [ main] se.su.it.simlu.esb.App : Started App in 1.849 seconds (JVM running for 2.386) 2018-10-19 10:42:33.129 WARN 65846 --- [0.1:61616@53365] org.apache.activemq.ActiveMQSession : Closed consumer on Command, ID:kaka.it.su.se-53364-1539938520009-1:1:1:1 2018-10-19 10:42:50.247 INFO 65846 --- [enerContainer-1] se.su.it.simlu.esb.Consumer : Message Received: Enter some text here for the message body... 2018-10-19 10:42:50.261 WARN 65846 --- [enerContainer-1] o.s.j.l.DefaultMessageListenerContainer : Setup of JMS message listener invoker failed for destination 'su.it.linfra.simlu' - trying to recover. Cause: The Consumer is closed 2018-10-19 10:42:50.300 INFO 65846 --- [enerContainer-1] o.s.j.l.DefaultMessageListenerContainer : Successfully refreshed JMS Connection {code} The order ("Consumer closed" before "Message Received") is weird because I just use a simple Thread.sleep I suspect: {code:java} @Transactional @JmsListener(destination = "su.it.linfra.simlu") public void receiveQueue(String text) throws Exception { Thread.sleep(50000); log.info("Message Received: "+text); } {code} was: The fix of AMQ-7079 introduced a breaking change bug since the default value of {{maxSlowCount=-1}} was longer enough for {{abortSlowAckConsumerStrategy}} to just configure the slow consumer detection but it started to disconnect the consumer as well.\{{}} Setting {{maxSlowDuration="-1"}} doesn't disconnect the consumer though but I don't think we should change the old default behavior. Pre AMQ-7079 fix: {code:xml} <abortSlowAckConsumerStrategy checkPeriod="1000" maxTimeSinceLastAck="3000" maxSlowCount="-1" /> {code} worked before in just detecting a slow consumer. consumer was *not* disconnected. After AMQ-7079 fix: {code:xml} <abortSlowAckConsumerStrategy checkPeriod="1000" maxTimeSinceLastAck="3000" maxSlowCount="-1" /> {code} disconnects the consumer; ActiveMQ logs: {code:java} 2018-10-19 10:42:33,124 | INFO | aborting slow consumer: ID:kaka.it.su.se-53364-1539938520009-1:1:1:1 for destination:queue://su.it.linfra.simlu | org.apache.activemq.broker.region.policy.AbortSlowConsumerStrategy | ActiveMQ Broker[localhost] Scheduler 2018-10-19 10:42:50,250 | WARN | no matching consumer, ignoring ack null | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport: tcp:///127.0.0.1:53365@61616 2018-10-19 10:42:50,257 | WARN | Async error occurred: java.lang.IllegalStateException: Cannot remove a consumer that had not been registered: ID:kaka.it.su.se-53364-1539938520009-1:1:1:1 | org.apache.activemq.broker.TransportConnection.Service | ActiveMQ Transport: tcp:///127.0.0.1:53365@61616 {code} Spring Boot logs: {code:java} 2018-10-19 10:42:00.209 INFO 65846 --- [ main] se.su.it.simlu.esb.App : Started App in 1.849 seconds (JVM running for 2.386) 2018-10-19 10:42:33.129 WARN 65846 --- [0.1:61616@53365] org.apache.activemq.ActiveMQSession : Closed consumer on Command, ID:kaka.it.su.se-53364-1539938520009-1:1:1:1 2018-10-19 10:42:50.247 INFO 65846 --- [enerContainer-1] se.su.it.simlu.esb.Consumer : Message Received: Enter some text here for the message body... 2018-10-19 10:42:50.261 WARN 65846 --- [enerContainer-1] o.s.j.l.DefaultMessageListenerContainer : Setup of JMS message listener invoker failed for destination 'su.it.linfra.simlu' - trying to recover. Cause: The Consumer is closed 2018-10-19 10:42:50.300 INFO 65846 --- [enerContainer-1] o.s.j.l.DefaultMessageListenerContainer : Successfully refreshed JMS Connection {code} > After AMQ-7079 abortSlowAckConsumerStrategy aborts connection by default > ------------------------------------------------------------------------ > > Key: AMQ-7081 > URL: https://issues.apache.org/jira/browse/AMQ-7081 > Project: ActiveMQ > Issue Type: Bug > Components: Broker > Reporter: Simon Lundstrom > Priority: Major > > The fix of AMQ-7079 introduced a breaking change bug since the default value > of {{maxSlowCount=-1}} was longer enough for {{abortSlowAckConsumerStrategy}} > to just configure the slow consumer detection but it started to disconnect > the consumer as well.\{{}} > Setting {{maxSlowDuration="-1"}} doesn't disconnect the consumer though but I > don't think we should change the old default behavior. > Pre AMQ-7079 fix: > {code:xml} > <abortSlowAckConsumerStrategy checkPeriod="1000" maxTimeSinceLastAck="3000" > maxSlowCount="-1" /> > {code} > worked before in just detecting a slow consumer. consumer was *not* > disconnected. > After AMQ-7079 fix: > {code:xml} > <abortSlowAckConsumerStrategy checkPeriod="1000" maxTimeSinceLastAck="3000" > maxSlowCount="-1" /> > {code} > disconnects the consumer; ActiveMQ logs: > {code:java} > 2018-10-19 10:42:33,124 | INFO | aborting slow consumer: > ID:kaka.it.su.se-53364-1539938520009-1:1:1:1 for > destination:queue://su.it.linfra.simlu | > org.apache.activemq.broker.region.policy.AbortSlowConsumerStrategy | ActiveMQ > Broker[localhost] Scheduler > 2018-10-19 10:42:50,250 | WARN | no matching consumer, ignoring ack null | > org.apache.activemq.broker.TransportConnection | ActiveMQ Transport: > tcp:///127.0.0.1:53365@61616 > 2018-10-19 10:42:50,257 | WARN | Async error occurred: > java.lang.IllegalStateException: Cannot remove a consumer that had not been > registered: ID:kaka.it.su.se-53364-1539938520009-1:1:1:1 | > org.apache.activemq.broker.TransportConnection.Service | ActiveMQ Transport: > tcp:///127.0.0.1:53365@61616 > {code} > Spring Boot logs: > {code:java} > 2018-10-19 10:42:00.209 INFO 65846 --- [ main] > se.su.it.simlu.esb.App : Started App in 1.849 seconds (JVM > running for 2.386) > 2018-10-19 10:42:33.129 WARN 65846 --- [0.1:61616@53365] > org.apache.activemq.ActiveMQSession : Closed consumer on Command, > ID:kaka.it.su.se-53364-1539938520009-1:1:1:1 > 2018-10-19 10:42:50.247 INFO 65846 --- [enerContainer-1] > se.su.it.simlu.esb.Consumer : Message Received: Enter some text > here for the message body... > 2018-10-19 10:42:50.261 WARN 65846 --- [enerContainer-1] > o.s.j.l.DefaultMessageListenerContainer : Setup of JMS message listener > invoker failed for destination 'su.it.linfra.simlu' - trying to recover. > Cause: The Consumer is closed > 2018-10-19 10:42:50.300 INFO 65846 --- [enerContainer-1] > o.s.j.l.DefaultMessageListenerContainer : Successfully refreshed JMS > Connection > {code} > > The order ("Consumer closed" before "Message Received") is weird because I > just use a simple Thread.sleep I suspect: > {code:java} > @Transactional > @JmsListener(destination = "su.it.linfra.simlu") > public void receiveQueue(String text) throws Exception { > Thread.sleep(50000); > log.info("Message Received: "+text); > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)