You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Jiri Danek (JIRA)" <ji...@apache.org> on 2017/05/22 12:37:04 UTC

[jira] [Created] (ARTEMIS-1177) clientFailureCheckPeriod option does not do what Doc says it does

Jiri Danek created ARTEMIS-1177:
-----------------------------------

             Summary: clientFailureCheckPeriod option does not do what Doc says it does
                 Key: ARTEMIS-1177
                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1177
             Project: ActiveMQ Artemis
          Issue Type: Bug
          Components: Broker
    Affects Versions: 2.1.0
            Reporter: Jiri Danek
            Priority: Minor


If I run the following

{noformat}
    @Test fun `clientFailureCheckPeriod option`() {
        val f = org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory("tcp://127.0.0.1:61616?clientFailureCheckPeriod=1000&connectionTTL=13000")
        val c = f.createConnection()
        Thread.sleep(5 * 1000)
        Runtime.getRuntime().exec("kill -SIGSTOP 27314")
        println(java.time.LocalDateTime.now())
        Thread.sleep(120 * 1000)
    }
{noformat}

(where 27314 is PID of Artemis), I get the following output

{noformat}
2017-05-22T14:18:07.027
14:18:28,023 WARN AMQ212037: Connection failure has been detected: AMQ119011: Did not receive data from server for org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnection@1d90b3b6[local= /127.0.0.1:54584, remote=/127.0.0.1:61616] [code=CONNECTION_TIMEDOUT]
{noformat}

There is approx 13 second delay between broker going down and client noticing it. Given the documentation for clientFailureCheckPeriod, I'd expect the client notices it after just 1 second.

"If the client does not receive any packets for a configurable number of milliseconds then it will consider the connection failed and will either initiate failover, or call any FailureListener instances (or ExceptionListener instances if you are using JMS) depending on how it has been configured." https://github.com/apache/activemq-artemis/blob/master/docs/user-manual/en/connection-ttl.md

I think that the documentation is wrong.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)