mirror of
https://github.com/thingsboard/thingsboard-gateway
synced 2025-10-26 22:31:42 +08:00
Merge pull request #997 from samson0v/master
This commit is contained in:
@@ -352,7 +352,13 @@ class MqttConnector(Connector, Thread):
|
||||
continue
|
||||
|
||||
# Setup regexp topic acceptance list ---------------------------------------------------------------
|
||||
regex_topic = TBUtility.topic_to_regex(mapping["topicFilter"])
|
||||
# Check if topic is shared subscription type
|
||||
# (an exception is aws topics that do not support shared subscription)
|
||||
regex_topic = mapping["topicFilter"]
|
||||
if not regex_topic.startswith('$aws') and regex_topic.startswith('$'):
|
||||
regex_topic = '/'.join(regex_topic.split('/')[2:])
|
||||
else:
|
||||
regex_topic = TBUtility.topic_to_regex(regex_topic)
|
||||
|
||||
# There may be more than one converter per topic, so I'm using vectors
|
||||
if not self.__mapping_sub_topics.get(regex_topic):
|
||||
|
||||
Reference in New Issue
Block a user