MQTT client sessions number explained

Hello,
I was wondering what “MQTT Client Sessions” was referring to.
Is it the CURRENT active number of client sessions or is it the total number of client sessions over a certain period of time?
I’m currently using the broker with just me and another friend, I would expect there to be no more than 10 sessions.

Any explanation would be greatly appreciated. Thanks in advance.

Screen Shot 2022-03-17 at 3.17.16 PM

Hi I am also interested to know what this is, currently I have only 5 and dont expect to have a significant number of devices or traffic in reality, but how is this counted, how can I keep it under control or reset it.

What happens if I Delete the cluster can I start again ?

Thanks also in advance

Hi @galeontiger ,

The (*) indicates that what is displayed and what is in the cluster actually happening can deviate. There is a delay from reporting of the cluster to the console (up to 10 min)

The number displayed takes into account:

  • currently actively connected clients ( to catch clients without persistent sessions )
  • persistent sessions

I hope this explanation helps,
Kind regards,
Dasha from HiveMQ Team

@Daria_H Thanks for the swift response, much appreciated.
We’ve been using the cloud broker from various devices and browsers for the past 12 hours, but it hasn’t moved once from 81/100.

There should have been 0 actively connected clients for most of the time.
I’m guessing this means that the 81/100 is from ‘persistent sessions’.

Is there a way to remove these persistent sessions from the cloud broker? :pray:

Update:
It’s now Monday morning and all devices have been off since Friday.
It’s still showing 81/100 MQTT client sessions.
I believe there may be a bug in this case.

Hi Tyler,

To delete a persistent session, you can use MQTT CLI and connect the same client id with –cleanStart option – this will delete the persistent session for the client id.

For more info please refer to Persistent Session and Queuing Messages - MQTT Essentials: Part 7 – see the section “How do you start or end a persistent session?

I hope this helps,
Kind regards,
Dasha from HiveMQ Team