We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://sabuhish.github.io/fastapi-mqtt/example/
The mqtt variable is undefined in the file. It should be replaced with fast_mqtt
mqtt
fast_mqtt
from fastapi_mqtt.fastmqtt import FastMQTT from fastapi import FastAPI from fastapi_mqtt.config import MQTTConfig app = FastAPI() mqtt_config = MQTTConfig() fast_mqtt = FastMQTT(config=mqtt_config) fast_mqtt.init_app(app) # Should be fast_mqtt here @mqtt.on_connect() def connect(client, flags, rc, properties): mqtt.client.subscribe("/mqtt") #subscribing mqtt topic print("Connected: ", client, flags, rc, properties)
The text was updated successfully, but these errors were encountered:
fastapi-slim
223a808
Successfully merging a pull request may close this issue.
https://sabuhish.github.io/fastapi-mqtt/example/
The
mqtt
variable is undefined in the file. It should be replaced withfast_mqtt
The text was updated successfully, but these errors were encountered: