ZmqttProducerV311
faststream.mqtt.publisher.producer.ZmqttProducerV311 #
Bases: ZmqttBaseProducer
Producer for MQTT 3.1.1 — publishes raw bytes only.
Headers, correlation_id, and other metadata are not supported. Use MQTT 5.0 for those features. Request/reply is supported via an explicit reply_to topic provided by the caller.
Source code in faststream/mqtt/publisher/producer.py
publish async #
publish(cmd: MQTTPublishCommand) -> None
Source code in faststream/mqtt/publisher/producer.py
request async #
request(cmd: MQTTPublishCommand) -> Message
Request/reply for MQTT 3.1.1 via explicit reply topic.
The caller must supply cmd.reply_to. FastStream subscribes to that topic, publishes the raw request payload, then waits for the first message on the reply topic. The handler side must publish its response to the same topic (e.g. via @broker.publisher).
Source code in faststream/mqtt/publisher/producer.py
publish_batch async #
publish_batch(cmd: MQTTPublishCommand) -> None