vernemq / vmq-docs

VerneMQ Documentation Project
12 stars 44 forks source link

Missing documentation or not up to date #43

Open SebUndefined opened 2 years ago

SebUndefined commented 2 years ago

It looks like there is a problem on the webhook documentation.

In the documentation, it is written (https://docs.vernemq.com/plugin-development/webhookplugins): "Note, the retry_interval is in milli-seconds. It is possible to override many more settings, see the Session Lifecycle for more information." (auth_on_register)

If I follow the link and go to the vernemq dev repo (https://github.com/vernemq/vernemq_dev/blob/master/src/auth_on_register_hook.erl), I can see the potentials modifiers under "reg_modifiers()" but I can't see the max_inflight_messages and retry_interval showed in the response example (still in webhook doc of auth_on_register https://docs.vernemq.com/plugin-development/webhookplugins)

Am I missing something ? Or does the documentation is ou of date ?

Thanks for your help !

ioolkos commented 2 years ago

@SebUndefined Thanks for pointing this out! It's not only the documentation but the typespec that needs an updating. Verne silently allows more modifiers than stated in the typespec (which is either a pain or a benefit). We should clear this up & I already have an issue open on this in the Verne repo.

This will all come. What you should let me know though, is when some modifier or something else is not working.


:point_right: Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq :point_right: Using the binary VerneMQ packages commercially (.deb/.rpm/Docker) requires a paid subscription.

SebUndefined commented 2 years ago

@ioolkos thanks for your answer.

I am currently developing an open source GO module that will provide all struct needed for parsing the VMQ request body and for creating the response (through builder). TS/JS will come afterwards.

Is there any way for me to get all available modifiers for any hook ?

Anyway I am not familiar with Erlang but I will try to have a look at the code :) )

ioolkos commented 2 years ago

@SebUndefined Awesome to hear! :) See notes in the issue here: https://github.com/vernemq/vernemq/issues/1908 Let me know when you need any help with anything.


:point_right: Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq :point_right: Using the binary VerneMQ packages commercially (.deb/.rpm/Docker) requires a paid subscription.

SebUndefined commented 2 years ago

Ok looks good ! I will start by the documentation of my module by detailing the potential modifiers of each hook based on this link https://github.com/vernemq/vernemq/blob/c3e35e2565aa515a09eea41453e3a764259674b1/apps/vmq_plugin/src/vmq_plugin_util.erl#L99-L119. That will help me for the development.

Maybe I will ask you to check it if you have time. And if you want to use it for yours, feel free. https://github.com/SebUndefined/govmq/tree/develop