Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Message to database plugin


Hi ,

I am new to Mosquitto and have been reading about mosquitto broker and MQTT broker for a couple of weeks.

It would be great if someone can answer my queries.

1. Is there any plugin available or in development, which would store the messages received by the broker in the configured database ? I know this can be done by a client subscribing to all the topics and then persisting it to database. But issues like what would happen If that specific client connection got disconnected got me looking for this kind of plugin. Something similar to http://www.hivemq.com/plugin/mqtt-message-log/

2. How can I write my own plugin of mosquitto broker ? if at all that is possible now .

thanks in advance !
--
Ravi Prakash Lakhotia


Hi Ravi

This topic has come up in the past. The consensus seems to be that you take care of storing your own state data.   

This can be done in a simple database using a MQTT small client that subscribes to the topics you want to save; and to requests to get a stored version of that data - performing a subsequent database lookup and MQTT publish.

We are using Google's Level DB which has a simple key -> value framework and ideally lends itself to storing topic -> payload data.

Andrew

Telemetry Layer



Back to the top