HTTP API for MQTT Broker (Mosquitto)

Skip to first unread message

Satish Madala

Nov 13, 2014, 12:25:00 AM11/13/14

I have a MQTT Broker (Server) to which 20,000 publishing clients will be sending "Json Data". And among those pub-clients, Few clients can directly send through MQTT  protocol but few clients can send only through HTTP POST.

How to build a Bridge for both protocols. Moreover, I wish to unencrypt the data posted by client & validate data-type for few required fields and Save to MongoDB (or Send to subscriber client to save it to DB?)

Andy Piper

Nov 13, 2014, 12:20:01 PM11/13/14
You could always just use node-red to do the bridging.

To learn more about MQTT please visit
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

Andy Piper | Kingston upon Thames, London (UK)
blog:   |   skype: andypiperuk
twitter: @andypiper  |  images:

Satish Madala

Nov 13, 2014, 8:44:15 PM11/13/14
Hi Andy,

I find Nodejs and Punte a bit unmanageable (I have few custom modifications). Are there any Python alternatives? 

Can I use Punte in production ? How do i make MQTT Publishers authenticate to particular topic for data posting & validate data on punte before saving it to MongoDB?

I want to make this on broker end! The downside of subscribing-client doing this is, if data-load increases on wldcard, subscribing-client  may miss the data while it also have to save it to DB!! Do the same problem persists with broker too? 

Dominik Obermaier

Nov 14, 2014, 6:20:19 AM11/14/14
Hi Satish,

we have seen many projects where people are using the HiveMQ plugin system for persisting messages to the DB (see [1], [2]). In recent projects some customers of us were using the HiveMQ RESTService [3], [4]. This allows to use standard JAX-RS 2.0 resource implementations to be used together with MQTT. So writing a MQTT-HTTP bridge (with custom logic for your use case) is a few-liner.

You'd need to do that with Java, though. If this is a showstopper for you, some out-of-the-box bridges like Ponte may work. I'd be also interested to know if there are any python alternatives available :)



Andrea Selva

Nov 14, 2014, 7:12:56 AM11/14/14

if you need just to bridge two protocols,probably an integration solution like Camel could also be a viable solution.


Shashank Agarwal

Nov 29, 2014, 7:07:43 AM11/29/14
Hi Satish, 

As Andy suggested, Node-red ( is worth looking at. It's a graphical mesh-up tool and you could do pretty much anything with input and send outputs to multitude of systems.

Reply all
Reply to author
0 new messages