don't filter topics if its explicit disabled #93
Merged
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.
During the investigation of #92 I found out, that even when the topic check is disabled via config (
topic-check": {"enabled": False}
). All plugins will be used to check for topic filtering.The reason is that in the method
topic_filtering
the valueNone
is passed forfilter_plugins
to the methodmap_plugin_coro
amqtt/amqtt/broker.py
Lines 728 to 738 in 8961b8f
In the manager then, if the value is
None
all available plugins will be used.amqtt/amqtt/plugins/manager.py
Lines 167 to 169 in 8961b8f
My fix will immediately return
True (topic_result)
if in thetopic-check
-configuration explicitenabled
was set toFalse
.If the key
enabled
is missing all plugins will be used as it was done before (backward compatibility).