Hivemq-ce persistence config

What is the equivalent of mosquitto:

persistence true
persistence_location /mosquitto/data


Hi caevv,
HiveMQ always persists its data.
You can change the folder by following the user guide.

Kind regards,

So basically for the persistence storage folder, would it be? HIVEMQ_DATA_FOLDER HiveMQ data folder

In order to set your data folder you need to add the following:

As Java option:


as Environment variable:

export HIVEMQ_DATA_FOLDER=/path/to/your/folder

Please not that HiveMQ uses the HIVEMQ_HOME/data folder by default, if you do not specifically set a folder.

1 Like

client publish meesage with qos1 and cleanSession=false option,
consumer consume with with qos1 and cleanSession=false option too.
but when the consumer offline and go back online,it can’t get offline message,so what the matter is?

First i use mqtt.fx gui client,it can’t receive offline message,
then i use eclipse paho client,it can receive message,so it’s probably the mqtt.fx problem

Hi @hellomqtt,

Welcome to the forum.
It’s possible that MQTT.fx has an issue here. HiveMQ CE does certainly queue offline messages for persistent (cleanStart=false / cleanSession=false )
Have you tried the MQTT CLI for testing, yet?

Florian from The HiveMQ Team.