mqtt_create_subscription()¶
Create new topic subscription, if there is a subscription, it generates an error.
Reference¶
Arguments¶
Only one callback function is needed (synchronous or asynchronous).
Argument |
Type |
|
|---|---|---|
topic |
|
Topic name to remove |
callback |
|
Synchronous method |
callback_async |
|
Asynchronous method |
Return¶
None
Exceptions¶
RayaCommExistingSubscription
See the complete communications exceptions.
See the general exceptions.
Usage example¶
self.communication.mqtt_remove_subscription(topic="/topic_name", callback_async=self.cb_topic)