mqtt_create_subscription()
  • 1 Minute to read

mqtt_create_subscription()


Article summary

Create new topic subscription, if there is a subscription, it generates an error.

Reference

Arguments

Only one callback function is needed (synchronous or asynchronous).

ArgumentType
topicstringTopic name to remove
callbackfunctionSynchronous method
callback_asyncfunctionAsynchronous 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)

Was this article helpful?