INNER CODE UNIT · Python
startup
sabuhish/fastapi-mqtt · fastapi_mqtt/fastmqtt.py:237
async def startup() -> None:
await self.mqtt_startup()
@fastapi_app.on_event("shutdown")
async def shutdown() -> None:
await self.mqtt_shutdown()
def subscribe(
self,
*topics,
qos: int = 0,
no_local: bool = False,
retain_as_published: bool = False,
retain_handling_options: int = 0,
subscription_identifier: Any = None,
) -> Callable[..., Any]:
"""
Decorator method used to subscribe for specific topics.