activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <>
Subject Re: [MQTT] Impossible to disable InactivityMonitor !
Date Tue, 23 Oct 2012 15:01:09 GMT
On Sat, Oct 20, 2012 at 7:47 AM, Aliquip <> wrote:

> After testing and comparing with mosquitto ( using
> mosquitto's python client the behavior is still different (and not very
> usable, sadly)
> Connecting with keepalive=0 results in the _client_ disconnecting
> immediately from the server (either mosquitto or activemq). So setting keep
> alive to 0 in the client isn't the way to keep the connection open forever.
> Connecting with keepalive=x (x > 0) results in the client keeping the
> connection open sending ping's every x seconds. If no PINGRESP is received
> after x seconds, the _client_ closes the connection. The mosquitto server
> keeps the connection open as long as pings are exchanged. The activemq
> server closes the connection after x seconds despite pings being received,
> it only keeps the connection open if other messages than pings are
> received.
> Maybe the (short term) solution is to make pings reset the countdown of the
> inactivity monitor, just like normal messages reset the countdown.
Can you try on the latest trunk? This behavior should be the case now with fixed

> I'm not really familiar with the MQTT (or activemq for that matter)
> protocol, but to me the problem seems to lie in the fact that in the MQTT
> protocol there is no such thing as keepalive / inactivitymonitor.
> Connections are kept open forever despite inactivity (when inactivity is
> defined as no messages except pingreq/pingresp). There is no way to clean
> unused connections in the way inactivitymonitor tries to do. Only a raw
> disconnect or a failure to ping disconnects a connection.
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at

*Christian Posta*

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message