Building smart MQTT Broker

359 views
Skip to first unread message

Mohammad Khalid

unread,
Jun 21, 2017, 10:09:41 PM6/21/17
to MQTT
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.

Regards

Alex Robenko

unread,
Jun 22, 2017, 11:32:26 PM6/22/17
to MQTT
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

unread,
Jun 23, 2017, 1:36:19 AM6/23/17
to mq...@googlegroups.com
Mohammed

If you have any experience coding in node.js / Javascript, you may do better to build off of Aedes. https://github.com/mcollina/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.

Paul

--
To learn more about MQTT please visit http://mqtt.org
---
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 mqtt+unsubscribe@googlegroups.com.
To post to this group, send email to mq...@googlegroups.com.
Visit this group at https://groups.google.com/group/mqtt.
For more options, visit https://groups.google.com/d/optout.



--
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: http://pzf.fremantle.org

Andrea Selva

unread,
Jun 23, 2017, 1:51:30 AM6/23/17
to mq...@googlegroups.com

Hi Mohammed,
Moquette.io github.com/andsel/moquette 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
  Regards

Reply all
Reply to author
Forward
0 new messages