Expand description
Package implement message queue broker based on MQTT protocol.
Currently implements MQTT-v5 broker and a corresponding client. Based on popular demand other message-queue protocols shall be integrated into this broker.
§Features
broker, enabled by default, provides all the necessary items needed to build a MQTT broker application. Enabling broker, will automatically enable client.
client, enabled by default, provides all the necessary items needed to build
an MQTT client. Application that doesn’t require a broker can disable default
features via --no-default-features
in cmd-line or via default-features = false
in dependency declaration.
backtrace, is library feature that captures backtrace at the point where error
is detected by this libarary. Additionally if logging
is enabled backtace is
logged as per the configured log-backend.
fuzzy, is used only by the test infrastructure. Typical application won’t have
a need for this. Enabling this will provide arbitrary::Arbitrary
implementation
for several types defined in this library.
By default broker
and client
features are enabled.
§Rust unstable features
§Binary artifacts
- mymqd, daemon program to start the server and manage the mymq deployment.
Modules§
- broker
- Broker implementation. Overview of broker design.
- util
- Helper functions.
- v5
- Module can speak MQTT Version-5 protocol.
Macros§
- config_
field - err
- Macro to compose Error values.
Structs§
- ClientID
- Type client-id implements a unique ID, managed internally as string.
- Config
- Configuration for broker and supported protocols.
- Error
- Type Error implement all possible error-values that can be returned by the Result type.
- F32
- Packet
Rx - Type implement the rx-handle for a packet-queue.
- Packet
Tx - Type implement the tx-handle for a packet-queue.
- Subscription
- Type captures an active subscription by client.
- Timer
- Differential Timer, to add timers for messages, sessions etc and manage expiry.
- Topic
Filter - Type implement topic-filter defined by MQTT specification.
- Topic
Name - Type implement topic-name defined by MQTT specification.
- VarU32
- Type implement variable-length unsigned 32-bit integer.
Enums§
- Blob
- Type is associated with Packetize trait and optimizes on the returned byte-blob.
- Error
Kind - Error kind expected to be handled by calling functions.
- Packet
Type - MQTT packet type
- Protocol
- Enumerated list of supported message-queue protocol.
- QPacket
- Enumerated types of packets supported by protocol.
- QoS
- Quality of service
- Queue
Status - Return type from methods used to send or receive messages/packets/commands.
- Reason
Code - ReasonCode defined by each variant defines error value.
- Retain
Forward Rule - RetainForwardRule part of Subscription option defined by MQTT spec.
- Socket
Constants§
- SLEEP_
10MS - Used by threads to sleep wait for an event to accur..
Traits§
- Iter
Topic Path - Trait implemented by TopicName and TopicFilter.
- Packetize
- Trait, to serialize data, implemented by types that participate in protocol framing.
- ToJson
- Trait that returns Jsonified strings.
Functions§
- new_
packet_ queue - Create a packet-queue for shard/miot that can hold upto
size
packets.