HiveMQ

MQTT client wakes up every second when connected to MQTT broker

Hi there,

I am connecting to the HiveMQ broker with a Sequans GM02S modem with a keepalive timeout of 3600 seconds (1 hour). However, every 60 seconds the device seems to wake up, but it does not exchange any data with the broker.

When looking at the “client” window within the HiveMQ broker, we can confirm that the keepalive timeout is indeed set to 3600. Is there any other broker configuration setttings that we can change in order to prevent the modem from waking up every 60 seconds?

At this stage we believe that it is broker related, as we have tested the connection to the Mosquitto MQTT broker and we do not see the wakeup every 60 seconds. We will most likely be using Hive in our final product though, and thus need to get this figured out and understand it.

I look forward to hearing any advice!

Kind regards
Frikkie

Just an update on this - the device wakes up every 60 seconds, but does not ping the broker on the MQTT protocol level. It does however exchange TCP level Keep alive ACKs.

Any advice to remove this will be greatly appreciated.

Hi @FrikkieBadenhorst,

I tried to reproduce what you described with the mqtt-cli (as I don’t have your device) and monitored the TCP traffic with Wireshark.

Mosquitto (2.0.10_1) and HiveMQ (4.5.3) produce the same list of packets when comparing the commands:

As I have not the device can you make the same test with Wireshark and check if the same packets are sent?

Greetings,
Michael from the HiveMQ team

Hi Michael,

I have indeed monitored the traffic with Wireshark with both brokers already, however see results below.

When connecting to the HiveMQ with keep alive time of 3600sec:


you can see there is a lot of traffic on the TCP level, but not on the MQTT level.

When connecting with the exact same setup to the Mosquitto (1.6.9)broker, the is only one ACK exchange between the broker and the client in 5 minutes. (I can not upload another media file as I am a new user).

As can be seen in the above traffic with HiveMQ, there is also a lot more ACK exchanges than expected.

Also please note we followed the instructions as described here to run the HiveMQ broker HiveMQ Docker Image

Hi @FrikkieBadenhorst,

are you running mosquitto not with docker? Because running HiveMQ or mosquitto with docker I get those TCP keep alives in both cases.
So my assumption this is a docker issue, but I found no solution so far.

Greetings,
Michael

Hi @michael_w,

No I am not running Mosquitto with docker. I actually have that installed on my local system. I will maybe look into getting Hive running without Docker as well to see if that resolves my issue.