fix: add keep alive config option for identifier rejected error #9803
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resolves #9763
Users were getting a identifier rejected error when using the plugin with mosquitto v2.0.12
eclipse/mosquitto v2.0.12 has a bug where you cannot set keep_alive to 0. This is now a known bug which will be fixed in the next release v2.0.13.
I've added a config option for keep_alive so that users can decide themselves what they want to set this to, and so users of v2.0.12 are still able to use this plugin.
Defaults to 0 (turning the keep alive feature off) as this has been the behavior of this plugin for the last 4 years. The library github.com/eclipse/paho.mqtt.golang we are using defaults keep_alive to 30.
Added documentation around the purpose of the config option and updated the integration test so if you are running any version of mosquitto it still passes.