Where is published message stored by mosquitto broker if offline?

0 votes
I'm using the Eclipse paho to publish messages with the mosquitto broker and when both my publisher and subscriber are both connected, I'm successfully able to receive the message. And, even if I disconnect the subscriber, I still get the messages upon reconnecting it. That means there must be a storage somewhere on the broker level where these messages get stored while the subscriber is offline. I just really wanted to know how many such messages can be stored on broker level while subscriber is offline
I'm publishing messages through the broker in paho with QOS=2 through a session persistence using clean_session=false. So, will this be feasible for a real-time GPS tracker where there are chances of my subscriber being offline for hours together, also how much traffic can it take for a scalable application? And, is my session persistence still in place when offline?
Aug 10, 2018 in IoT (Internet of Things) by Bharani
• 4,550 points
406 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
+1 vote
Well, of course, they are stored! That is the main idea behind session persistence and if I'm correct, a 32-bit mosquitto broker uses a huge disk space of storage, like at least more than 1 GB for sure.
And, the file being written to disk in the mosquitto.conf file autosave* and persistence* options is 'mosquitto.db' and you can control where it is being written. But, I hope you don't have abnormally large lengths in your messages! It is a common problem though, avoid doing that! And, it will still depend on factors like how many publishers or subscribers you have or your message rates. Also, the session persistence is also maintained in the same .db file so that its state just resumes upon the broker starting again or the subscriber coming online.
answered Aug 10, 2018 by nirvana
• 3,060 points

Related Questions In IoT (Internet of Things)

0 votes
1 answer

What is the maximum message length for a MQTT broker?

It's not entirely clear what you're asking ...READ MORE

answered Jul 17, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
117 views
0 votes
1 answer

What is the time taken by a 200 byte message for transmission in a beacon-enabled network?

Now, data rates of IEEE 802.15.4 are ...READ MORE

answered Aug 23, 2018 in IoT (Internet of Things) by Upasana
• 8,210 points
23 views
0 votes
1 answer

Testing if messages from my Device is reaching the Azure IoT Hub?

Download the Device Explorer open source tool ...READ MORE

answered Aug 10, 2018 in IoT (Internet of Things) by DataKing99
• 8,100 points
364 views
0 votes
1 answer

What kind of server is used by IoT?

So, IoT does not really need a ...READ MORE

answered Jan 28 in IoT (Internet of Things) by Shubham
• 12,890 points
22 views
0 votes
1 answer
0 votes
1 answer

Eclipse Paho: read data from MQTT Broker

From what I could analyze, you've been ...READ MORE

answered Aug 8, 2018 in IoT (Internet of Things) by DataKing99
• 8,100 points
464 views
0 votes
1 answer

Mosquitto broker- Horizontally scaling

For accuracy, let me mention that other ...READ MORE

answered Sep 5, 2018 in IoT (Internet of Things) by Upasana
• 8,210 points
280 views
0 votes
1 answer

MQTT protocol connection error

Ok so you need two libraries to ...READ MORE

answered Jul 6, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points

reshown Jul 6, 2018 by Vardhan 314 views
0 votes
1 answer

MQTT pubish is slow to send with ESP8266 & NodeMCU

I think you're almost correct and on ...READ MORE

answered Aug 1, 2018 in IoT (Internet of Things) by nirvana
• 3,060 points
558 views
0 votes
1 answer

MQTT broker for Google App Engine

You had a hard time finding anything ...READ MORE

answered Aug 1, 2018 in IoT (Internet of Things) by nirvana
• 3,060 points
156 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.