2

How can I make a plugin like mosquitto-auth-plug for authorization, or one for storing message payloads or other usages? Should I write it in C or can I use python?

hardillb
  • 54,545
  • 11
  • 67
  • 105
Masoud Aghaei
  • 1,113
  • 2
  • 15
  • 27

1 Answers1

2

Any plugin for mosquitto is going to have to be written in something that can be compiled to a native shared library that can be loaded by mosquitto. This would normally mean C or C++

There are hooks in place for the authentication plugin, but none for message storage or anything else so that is unlikely to work without modifying mosquitto directly.

You should examine the code for the auth-plugin and for mosquitto for details.

hardillb
  • 54,545
  • 11
  • 67
  • 105
  • Could you please give more information on how you link shared library to mosquitto? Is there examples somewhere? – nowox Apr 23 '18 at 11:31
  • The only example I know of is @jpmens authentication plugin https://github.com/jpmens/mosquitto-auth-plug/ – hardillb Apr 23 '18 at 12:04