You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, this library returns a message callback containing a topic and payload if a subscription has been updated.
While one could filter for a specific MQTT topic within the on_message method, it is clunky.
This enhancement would add message callbacks which only trigger on a specific topic match.
Note: Topics must be subscribed to, prior to adding the callback handler.
Proposed methods: message_callback_add(mqtt_topic, callback_method): Connect a user-defined method to a MQTT subscription topic.
Currently, this library returns a message callback containing a topic and payload if a subscription has been updated.
While one could filter for a specific MQTT topic within the
on_message
method, it is clunky.This enhancement would add message callbacks which only trigger on a specific topic match.
Note: Topics must be subscribed to, prior to adding the callback handler.
Proposed methods:
message_callback_add(mqtt_topic, callback_method)
: Connect a user-defined method to a MQTT subscription topic.message_callback_remove(mqtt_topic, callback_method)
: Remove a user-defined method from a specific mqtt topic.Example Usage in Paho MQTT Python: https://github.com/eclipse/paho.mqtt.python/blob/master/examples/client_sub-multiple-callback.py#L45
The text was updated successfully, but these errors were encountered: