Building smart MQTT Broker

Skip to first unread message

Mohammad Khalid

Jun 21, 2017, 10:09:41 PM6/21/17
Hello everyone,

I am a complete newbie to the MQTT world.

I have been given a task where I have to build an intelligent broker using the same MQTT algorithm or creating a new one. The published messages arriving at the broker should be processed based on rules engine before getting forwarded to the subscribers. The rules should be changed through web interface. Another feature required in this task is to keep the record of messages arrive in any type of database(i.e MYSQL, Google sheets) and voting among the sensors should take place. Sorting of sensors values and types in database should be done with the help of payload which could be in JSON format. 

I have got the open source mosquitto broker and I am struggling about to start this task and from where in the MQTT Broker I can grab the payload. Any help or suggestions would be highly appreciated.


Alex Robenko

Jun 22, 2017, 11:32:26 PM6/22/17
If I'm not mistaken, mosquitto broker allows implementation of a authentication + ACL plugin (see API).
Once loaded, the implemented functions will be invoked to check client's authentication as well as for every forwarded topic to inquire whether it is allowed. Inside you may access your rules database and do whatever you like.

Paul Fremantle

Jun 23, 2017, 1:36:19 AM6/23/17

If you have any experience coding in node.js / Javascript, you may do better to build off of Aedes.

Aedes is a barebones MQTT broker from Matteo Collina that lets you do exactly the sort of things you are talking about. You can "embed" the broker in your web app and intermediate as much as you like.


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

Paul Fremantle
Doctoral Researcher, University of Portsmouth, School of Computing
Visiting Scientist, Institute of the Architecture of Application Systems, Stuttgart
Visiting Lecturer, Software Engineering Programme, Oxford University
Co-Founder, WSO2
Apache Member and Committer
twitter: pzfreo / skype: paulfremantle / blog:

Andrea Selva

Jun 23, 2017, 1:51:30 AM6/23/17

Hi Mohammed, has some interceptors of various phases,but the interceptors are just observer and can't veto publish forward. Moquette is written Java and can be embedded with ease.

Andrea ,Moquette broker maintainer

Reply all
Reply to author
0 new messages