[ https://issues.apache.org/jira/browse/ARTEMIS-2145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16692801#comment-16692801 ]
alin.p commented on ARTEMIS-2145: --------------------------------- I find another config connection-ttl-check-interval, by default, this will check dead connection from server every 2 seconds. I think this is the reason. > connectionTtl not work in MQTT Protocol > --------------------------------------- > > Key: ARTEMIS-2145 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2145 > Project: ActiveMQ Artemis > Issue Type: Bug > Components: MQTT > Affects Versions: 2.6.3 > Environment: OS: windows 6.1.7601 64bit > artemis version: 2.6.3 > java version: 1.8.0_25 hotspot 64bit > client version: paho > Reporter: alin.p > Priority: Minor > > 1. use mqtt acceptor and config in broker.xml like below > <acceptor name="mqtt">tcp://0.0.0.0:1883?protocols=MQTT</acceptor> > 2. start artemis > 3. use [org.eclipse.paho.client > |https://www.eclipse.org/paho/clients/java/]client to connect and connection > option like below > MqttConnectOptions connOpts = new MqttConnectOptions(); > connOpts.setCleanSession(false); > connOpts.setConnectionTimeout(30); > connOpts.setKeepAliveInterval(*0*); > 4. if set connOpts.setKeepAliveInterval(0); the client connection will close > immediately > > 5. if set connOpts.setKeepAliveInterval(*30*); the client connection will > close normally > > expect: > mqtt acceptor should close connection depend on connectionTtl , the default > value is 30 seconds. > > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)