← Back to team overview

mosquitto-users team mailing list archive

Mosquitto and MySQL

 

Hello,
starting to imagine a "serious" application with Mosquitto (or better, with MQTT and Mosquitto as a broker) I was asking myself if anyone investigated about a best practice for keeping messages archived, for later queries and statistics or any other usage.

MySQL is my first choice, as it's considered a standard if I need to offer some kind of link to a webserver or remote ODBC connector.

Two different approaches:
- modify the broker so that it saves messages directly to MySQL instead of the present way (flat file? SQLite? What's today??) PRO: best integration CON: difficult to be maintained and configured - build a separate application that subscribes/publish to the broker and saves/retrieves to MySQL with standard SQL queries. PRO: extensible and configurable CON: another application to be maintained

Any useful idea about this scenario?

Thanks S

--
  Stefano Costa, R&D Manager
  M +39 335 6565749
  Skype stefanocosta.bluewind
  http://www.bluewind.it/stefanoco?code=9



Follow ups