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
class TemperatureServiceClient:
def __init__(self):
self.client = mqtt.Client()
self.client.connect(mqttBroker)
But this would throw an error because the python in this case now requires a callback api version specification. I researched further on how to fix and found out the the python client packages offer two version for api call back and any can be used in this case
CallbackAPIVersion.VERSION2
or
CallbackAPIVersion.VERSION1
so the fixed code should look something like this
class TemperatureServiceClient:
def __init__(self):
self.client = mqtt.Client(CallbackAPIVersion.VERSION2)
self.client.connect(mqttBroker)
The text was updated successfully, but these errors were encountered:
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request. Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
In the tutorial it has this snippet
But this would throw an error because the python in this case now requires a callback api version specification. I researched further on how to fix and found out the the python client packages offer two version for api call back and any can be used in this case
so the fixed code should look something like this
The text was updated successfully, but these errors were encountered: