AWS IoT Device sdk python user_data_set()

Timothy Smith Source

In the paho.mqtt library it is possible to set the user data that will be passed to callbacks either in the constructor:

client = Client(client_id="", clean_session=True, userdata=myData, protocol=MQTTv311)

or at a later point with:


In aws-iot-device-sdk-python I would like to have the same possibilities to have access to myData when subscriping to a topic with:

client_AWS.subscribe("myTopic", 1, customCallback)

In the documentation (aws-iot-device-sdk-python) it says: Custom Callback:

Function to be called when a new message for the subscribed topic comes in. Should be in form `customCallback(client, userdata, message)`

How can I manually set the userdata?



comments powered by Disqus