Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Can you use mosquitto /mqtt to track changes in databases

Thanks for the response.  I've read other articles where people have tried similar things using triggers.  But once the database triggers a message to the mqtt topic saying "hey everyone, there's a change", we still need a way to get the data out.  
So, the next question I have is how big can the mqtt message be? 
and are there limitations on what the message can contain? 
I don't plan on putting the actual changed data in the message... but nonetheless, I need to know how big the message can be to design the rest of the solution.
In my case, I'm hoping the end point will be an HTTP application on a server... so it will subscribe the mqtt topic and listen for changes.
Is that possible? 

Hi Marl

I've never tried this using MQTT, <but>, it should be possible to use MQTT paho lib as the communication medium between your mobile device(s) and the trigger-event system. One part will be to setup (pending on the database) triggers that "watch" for change(s) and inside the trigger you need to hook in your notification system sending a MQTT message....basic idea is - the database trigger and pub a message to say mosquitto - you have to thing carefully on how you going to use our topic's for this sort of "notifications" ....

I when work with topics I normally look at the end-point,...the system subscribing to topics...what will the application LISTEN for and what will it do with the in this instance, the mobile phone or desktop is the end point....

But I think it should be possible - you can even use the trigger on database side to drop the info in a Queue and get workers to pub MQTT message for people to all depends on what is possible on the database trigger side ;)

My 2 sent worth of option/input

Hope it helps a bit....

On Tue, Jan 13, 2015 at 10:29 PM, Marl Li <happydevdays@xxxxxxxxx> wrote:
Hi. Has anyone tried using mqtt to track and share changes in a database? 
specifically, when data in a database changes i would like to notify some interested parties, and provide a way for them to get at the data. 
Is this possible using mqtt? 


Back to the top