I've just started learning Mosquitto recently. I need to create a custom event handler (on client connect and on message received) that will be built in Mosquitto and run on server as a bundle. The idea is not in using separate program (client) subscribed to some topics (as it works in most use-cases) but make Mosquitto handle data.
My idea is:
- Some imagine client do a pub to Mosquitto in some topic.
- Mosquitto do its magic (default behavior) and also runs a callback (so the data handled the way I describe it in CB)
I've read Mosquitto API docs but can hardly understand how to use it.
Questions are:
- Is that possible to create such plugin using Mosquitto/API?
- Do you have a repository with an example of creating callbacks? Seen mysql example and auth-plug example but none worked for me - still no luck in building custom plugin.
- Or maybe someone can describe the process of creating plugins / extending mosquitto?
- Any instructions on building plugins and injecting them into Mosquitto?