How faststream-community/zmqtt works
zmqtt is a pure-asyncio MQTT 3.1.1/5.0 client. Applications create a client, connect to a broker, publish or subscribe, then consume messages through subscription-local queues; incoming messages are routed to a subscription or a correlated request. The graph preserves the packet codec, protocol/state machinery, routing and request/response branches, and transport layer. Source-index references and README statements support the links shown; unsampled implementation details are represented only at their documented subsystem level.
Main entry points: protocol.py Protocol Engine · client.py Async Client · inbound.py Inbound Processing · codec.py Packet Codec
Components 20
Client API
- Async Client
src/zmqtt/client.py - Public API
src/zmqtt/__init__.py
Protocol Engine
- Protocol Engine
src/zmqtt/_internal/protocol.py - Session State
src/zmqtt/_internal/state.py - Async Compatibility
src/zmqtt/_internal/_compat.py
Delivery and Routing
- Inbound Processing
src/zmqtt/_internal/inbound.py - Recipient Router
src/zmqtt/_internal/routing.py - Subscription Index
src/zmqtt/_internal/subscription_index.py - Topic Matching
src/zmqtt/_internal/topic_matching.py - Request Response
src/zmqtt/_internal/request_response.py - Message
src/zmqtt/_internal/types/message.py - QoS and Types
src/zmqtt/_internal/types
MQTT Wire and Transport
- Packet Codec
src/zmqtt/_internal/packets/codec.py - Packet Models
src/zmqtt/_internal/packets - MQTT Properties
src/zmqtt/_internal/packets/properties.py - Packet Reader
src/zmqtt/_internal/packets/reader.py - Stream Transport
src/zmqtt/_internal/transport/base.py - TCP and TLS
src/zmqtt/_internal/transport
Other components
- Application
- MQTT Broker
Connections 31
- Application → Public API: uses API
README.md - Public API → Async Client: creates client
src/zmqtt/__init__.py - Async Client → Protocol Engine: drives protocol
src/zmqtt/client.py - Async Client → Request Response: starts requests
src/zmqtt/client.py - Async Client → Session State: manages session
src/zmqtt/client.py - Async Client → Stream Transport: uses transport
src/zmqtt/client.py - Async Client → Subscription Index: manages subscriptions
src/zmqtt/client.py - Protocol Engine → Inbound Processing: dispatches packets
src/zmqtt/_internal/protocol.py - Protocol Engine → Packet Codec: encodes and decodes
src/zmqtt/_internal/protocol.py - Protocol Engine → Packet Reader: reads packets
src/zmqtt/_internal/protocol.py - Protocol Engine → Session State: updates session
src/zmqtt/_internal/protocol.py - Protocol Engine → Stream Transport: reads and writes
src/zmqtt/_internal/protocol.py - Protocol Engine → Subscription Index: uses subscriptions
src/zmqtt/_internal/protocol.py - Protocol Engine → Topic Matching: validates filters
src/zmqtt/_internal/protocol.py - Inbound Processing → Packet Codec: decodes packets
src/zmqtt/_internal/inbound.py - Inbound Processing → Recipient Router: selects recipient
src/zmqtt/_internal/inbound.py - Inbound Processing → Session State: updates QoS state
src/zmqtt/_internal/inbound.py - Inbound Processing → Subscription Index: selects subscription
src/zmqtt/_internal/inbound.py - Inbound Processing → Message: builds message
src/zmqtt/_internal/inbound.py - Recipient Router → Subscription Index: selects subscription
src/zmqtt/_internal/routing.py - Subscription Index → Topic Matching: matches filters
src/zmqtt/_internal/subscription_index.py - Subscription Index → Message: queues message
src/zmqtt/_internal/subscription_index.py - Request Response → Message: matches response
src/zmqtt/_internal/request_response.py - Packet Codec → Packet Models: encodes packets
src/zmqtt/_internal/packets/codec.py - Packet Codec → MQTT Properties: encodes properties
src/zmqtt/_internal/packets/codec.py - Packet Codec → QoS and Types: uses QoS
src/zmqtt/_internal/packets/codec.py - Packet Reader → Packet Codec: decodes frames
src/zmqtt/_internal/packets/reader.py - Stream Transport → Async Compatibility: uses wait helper
src/zmqtt/_internal/transport/base.py - TCP and TLS → Stream Transport: implements transport
src/zmqtt/_internal/transport/tcp.py - Async Client → TCP and TLS: selects connection
src/zmqtt/client.py - Stream Transport → MQTT Broker: transfers bytes
README.md