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

thanks for the response !

On Mon, Oct 20, 2014 at 4:22 PM, Roger Light <roger@xxxxxxxxxx> wrote:
Hi Ravi,

The only plugin interface for mosquitto at the moment is for
authentication / access control. You do have access to the source
though...

The function you'd be interested in to add your own hooks is
mqtt3_handle_publish() in src/read_handle.c

Cheers,

Roger



On Mon, Oct 20, 2014 at 10:46 AM, ravi lakhotia
<ravilakhotia2006@xxxxxxxxx> wrote:
> Hi Andrew,
>
> Currently I am doing that. Is it possible to write hooks to mosquito broker
> service ?
>
> Ian,
>     I have not tried QoS 2 yet. using the client libraries from paho, so
> hoping they must have taken care of such issues.
>
> thanks for the reply!
>
> On Mon, Oct 20, 2014 at 12:30 AM, Ian Craggs
> <icraggs@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
>>
>> 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
>> http://southweb.co.nz/telemetrylayer
>>
>>
>>
>>
>> _______________________________________________
>> 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
>>
>>
>> _______________________________________________
>> 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
>
>
>
>
> --
> Ravi Prakash Lakhotia
>
>
> _______________________________________________
> 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
_______________________________________________
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



--
Ravi Prakash Lakhotia


Back to the top