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

If you use QoS 2 messages, and a client connected non-cleansession, then no messages should go missing if any connection is lost.  Whether power failure could cause missing messages is down to the features of the client library and the broker.

Ian


On 10/19/2014 06:23 PM, Andrew McClure wrote:

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




_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mosquitto-dev

-- 
Ian Craggs                          
icraggs@xxxxxxxxxx                 IBM United Kingdom
Paho Project Lead; Committer on Mosquitto


Back to the top