Skip to main content

Crate ruststream_rumqttc

Crate ruststream_rumqttc 

Source
Expand description

MQTT 5 broker implementation for RustStream, built on rumqttc.

Handlers, routers, codecs, and middleware come from the framework; this crate supplies the transport over rumqttc, targeting MQTT 5 because two things the framework relies on exist only there: user properties (headers travel natively instead of through an invented envelope) and shared subscriptions (competing consumers are expressible at all).

  • The crate owns a connection task that drives the client’s single event loop, demultiplexes packets to per-subscription streams by topic-filter matching, reconnects with backoff, and resubscribes when the broker reports the session gone - all without ever stalling keep-alive traffic.
  • Acknowledgement follows the quality of service: QoS 1/2 acknowledge through the protocol under manual control; QoS 0 reports AckError::Unsupported rather than pretending, as does nack(requeue = true) - MQTT has no negative acknowledgement, and unacked messages redeliver when a persistent session resumes.
  • Retained messages, last will, session persistence, and TLS with client certificates are configuration on the broker and the publish policy.

Structs§

ConnectedMqttBroker
The typed witness that connect succeeded: holds the live client directly.
MqttBroker
An MQTT 5 broker for the RustStream messaging framework.
MqttMessage
A message delivered by an MqttSubscriber.
MqttPublish
The publish policy for MqttPublisher: quality of service and the retain flag as pure declaration, paired with the connected broker by the runtime after connect.
MqttPublisher
Publishes messages to MQTT topics through the shared connection.
MqttSubscriber
A subscription to one MQTT topic filter; yields MqttMessages.
MqttTopic
A subscription descriptor for one MQTT topic filter.

Enums§

MqttError
Errors returned by the MQTT 5 broker.
Qos
Delivery quality of service for a subscription or a publish policy.