Releases: rmqtt/rmqtt
0.15.0-rc.1
What's Changed
- docs: update version references and rust version requirements
- Updated Rust version badge from 1.81.0 to 1.85.0 in READMEs
- Updated version references across documentation:
- Changed rmqtt from 0.15.0-beta.5 to 0.15.0-rc.1
- Updated rmqtt-codec from 0.1.0 to 0.1.1
- Updated rmqtt-macros from 0.1.0 to 0.1.1
- Updated rmqtt-net from 0.1.0 to 0.1.2
- Updated rmqtt-utils from 0.1.0 to 0.1.2
- Simplified plugin registration examples by removing redundant name parameters
- Ensured all documentation reflects current version requirements
- docs: add DeepWiki support badge to READMEs
- Added DeepWiki badge to both English and Chinese READMEs
- Badge links to RMQTT documentation on DeepWiki
- Helps users quickly access AI-powered documentation
- support plugin config map when init by @timzaak in #206
- build: enable panic abort in release profile
- fix(bridge-egress-mqtt): improve string handling and bump version to 0.1.1
- Bump version from 0.1.0 to 0.1.1
- Changed string conversions from as_ref() to to_string() for:
- MQTT v3/v5 client ID handling
- Publish properties (user properties, content type, response topic)
- Ensures proper string encoding and avoids potential reference issues
- Improves reliability when handling UTF-8 strings in MQTT properties
- More explicit string conversion makes code behavior clearer
- fix(bridge-ingress-mqtt): improve string handling and bump version to 0.1.2
- Bump version from 0.1.1 to 0.1.2
- Changed client ID string conversions from as_ref() to to_string() in:
- MQTT v4 client initialization
- MQTT v5 client initialization
- Subscription handling in both versions
- Ensures consistent string encoding for client IDs
- Prevents potential reference issues with string handling
- Matches improvements made in egress bridge counterpart
- chore(retainer): update dependencies and configuration [v0.1.1]
- Updated rmqtt-storage dependency to v0.7 with sled/redis features
- Changed default retained_message_ttl from "1m" to "0m" (no expiration)
- chore(message-storage): update dependencies and improve error handling [v0.1.3]
- Bumped version from 0.1.2 to 0.1.3
- Updated rmqtt-storage dependency to v0.7 with redis/redis-cluster features
- Added explicit error handling for storage initialization
- Improved error logging when storage DB initialization fails
- chore(session-storage): update dependencies and improve error handling [v0.1.2]
- Bumped version from 0.1.1 to 0.1.2
- Updated rmqtt-storage to v0.7 with sled/redis/redis-cluster support
- Added robust error handling for storage initialization
- Improved error logging when storage DB initialization fails
- Removed redundant serde default attribute from storage config
- perf(session-storage): major performance and monitoring improvements
- Enhanced session statistics collection:
- Added detailed offline message counting in stats collection
- Increased max_limit from 100 to 1000 for better visibility
- Separated session counts into active/offline categories
- Added timeout protection for stats collection (1 second)
- Optimized storage operations:
- Moved all storage operations to background tasks using tokio::spawn
- Added proper error handling and logging for background operations
- Implemented timeout for subscription saves (8 seconds)
- Improved error messages (removed debug formatting)
- Refactored session management:
- Split large methods into focused helper functions
- Reduced lock contention by moving operations outside critical sections
- Improved code organization and readability
- Added dedicated functions for TTL management
- Added detailed metrics tracking:
- Now tracking both offline sessions and individual offline messages
- Added storage operation timing measurements
- Improved debug logging for storage operations
- Enhanced session statistics collection:
- feat(core): add macros feature and derive Clone for DisconnectInfo
- Added new 'macros' feature flag that enables:
- rmqtt-macros dependency
- metrics functionality
- plugin support
- Enhanced DisconnectInfo type:
- Derived Clone trait implementation
- Maintained existing Debug, Default, Deserialize, Serialize traits
- Added new 'macros' feature flag that enables:
- style: modernize string formatting syntax
- style: apply clippy automated fixes
- refactor(session-storage): optimize storage backend features and logging
- Make
rmqtt-storage
dependency optional inCargo.toml
- Add
package.metadata.docs.rs
config for docs generation - Split storage backend features (
sled
,redis
,redis-cluster
) into optional features - Improve log messages for session rebuilding (e.g., "offline session rebuilding finished")
- Add
#[cfg(feature)]
guards for storage-specific code blocks - Update
rmqtt-bin
to explicitly enable storage features (sled
,redis
,redis-cluster
)
- Make
- refactor(message-storage): modularize storage backends with feature flags
- Split storage implementations into feature-gated modules (
ram
,redis
,redis-cluster
) - Make
rmqtt-storage
dependency optional in Cargo.toml - Add explicit feature flags in Cargo.toml with docs.rs metadata
- Add conditional compilation for storage-specific code paths
- Remove default implementation for Config enum
- Improve storage type validation in config deserialization
- Clean up imports and unused atomic Ordering
- Update config handling to match active features
- Split storage implementations into feature-gated modules (
- refactor(retainer): implement feature-based storage backend selection
- Split storage implementations into feature-gated modules (
ram
,sled
,redis
) - Make
rmqtt-storage
dependency optional in Cargo.toml - Add package metadata for docs.rs with all-features flag
- Add explicit feature flags in Cargo.toml:
ram
- for in-memory storagesled
- for sled-based storageredis
- for redis storage
- Implement conditional compilation for storage-specific code
- Remove default implementation for Config enum
- Improve storage type validation in config deserialization
- Clean up imports and unused code
- Update config handling to match active features
- Replace anyhow with rmqtt's error handling
- Split storage implementations into feature-gated modules (
- chore(examples): update plugin dependencies with explicit feature flags
Full Changelog: 0.15.0-beta.7...0.15.0-rc.1
0.15.0-beta.7
What's Changed
- refactor(web-hook): improve error handling and client management #199
- Bump version from 0.1.2 to 0.1.3
- Replace global HTTP client with instance-based client
- Remove once_cell dependency and singleton patterns
- Move failure counter into plugin instance
- Add HTTP client as instance member
- Improve error handling with proper client passing
- Simplify request retry logic
- Add proper client management for each plugin instance
- Remove global failure counter in favor of instance tracking
- feat(http-api): improve prometheus metrics handling and bump version to 0.1.5 #199
- Bump version from 0.1.4 to 0.1.5
- Replace global prometheus monitor with instance-based approach
- Add Monitor as request context state
- Remove once_cell dependency and singleton pattern
- Improve metrics collection by passing monitor instance through requests
- Add proper error handling for monitor retrieval
- Update route setup to include monitor state
- Clean up prometheus metrics generation code
- refactor(cluster-raft): remove global task queue and bump version to 0.1.5 #200
- Bump version from 0.1.4 to 0.1.5
- Remove global task_exec_queue singleton pattern
- Add TaskExecQueue as instance member in ClusterPlugin
- Pass TaskExecQueue through all components (Router, Shared, Handler)
- Remove once_cell dependency
- Improve task queue management by making it instance-specific
- Update all spawn calls to use instance queue
- Clean up imports and dependencies
- Add better task queue monitoring in status reporting
- refactor(cluster-raft): remove global backoff strategy and clean up dependencies #202
- Remove global BACKOFF_STRATEGY singleton
- Add instance-based ExponentialBackoff to components
- Pass backoff strategy through constructors (Router, Handler)
- Clean up unused dependencies (once_cell, regex)
- Initialize backoff strategy in ClusterPlugin
- Update all retry calls to use instance strategy
- Improve error handling with instance-specific backoff configuration
- refactor(auth-http): remove global HTTP client and bump version to 0.1.3 #201
- Bump version from 0.1.2 to 0.1.3
- Remove global HTTP_CLIENT singleton using once_cell
- Add instance-based reqwest::Client as plugin member
- Pass HTTP client through to AuthHandler
- Replace static client initialization with new_reqwest_client() function
- Update all HTTP request methods to use instance client
- Remove once_cell dependency
- Improve request handling with instance-specific client
- chore: remove once_cell dependency across multiple crates #203
- Removed once_cell dependency from:
- rmqtt-net (moved to dev-dependencies)
- rmqtt-auth-http
- rmqtt-cluster-broadcast
- rmqtt-http-api
- rmqtt-message-storage
- rmqtt-session-storage
- rmqtt-web-hook
- rmqtt (main crate)
- Cleaned up Cargo.toml files by removing unused once_cell entries
- Moved once_cell to dev-dependencies where still needed for tests
- Removed once_cell dependency from:
Full Changelog: 0.15.0-beta.6...0.15.0.beta.7
0.15.0-beta.6
What's Changed
- feat(listener): add max_session_expiry_interval to cap session expiry. #191
- Introduced a new config field
max_session_expiry_interval
inListenerInner
andBuilder
- Added logic to cap the session expiry interval based on this upper limit
- Updated
rmqtt.toml
to include the new configuration option - Modified
fitter.rs
to respect themax_session_expiry_interval
when determining final session expiry duration
- Introduced a new config field
- refactor: update rust-box to v0.15 and migrate to DuplexMailbox API. #193
- Bump rust-box from v0.14 to v0.15
- Switch from
Client::send
toDuplexMailbox::send
- Replace
notify()
withsend()
in broadcast plugin - Use
scopeguard::defer
to manageactive_tasks
counter lifecycle
- add local_address api. by @timzaak #195
- feat(listener): enhance listener management and tracking
- Added ListenerId type for unique listener identification
- Modified listener storage from Port-based to ListenerId-based in ServerContext
- Updated MqttServerBuilder to support explicit listener IDs:
- Added
listener_by_id()
for explicit ID assignment - Added warning for dynamically assigned ports
- Added
- Enhanced listener logging to show actual bound address
- Extended client ID tracking to include listener ID:
- Added
lid
field to_Id
struct - Updated ID display format to include listener ID
- Modified ID equality and hashing to include listener ID
- Added
- Updated protocol processors (v3/v5) to accept listener ID parameter
- Refactored all listener handler functions to pass through listener ID
- Improved listener configuration validation
- refactor(session-storage): replace singleton with instance cloning and improve listener handling
- Bump version from 0.1.0 to 0.1.1
- Remove OnceCell singleton pattern and implement Clone for StorageSessionManager
- Replace get_or_init() with new() constructor
- Update session manager type from reference to owned instance
- Modify listener config lookup to use lid instead of port
- Add debug logging for listener configuration
- refactor(message-storage): replace singleton pattern with instance cloning
- Bump version from 0.1.1 to 0.1.2
- Remove OnceCell singleton pattern and implement Clone for managers
- Replace static get_or_init() with direct new() constructor
- Update message manager types to owned instances instead of references
- Improve task spawning and cleanup handling
Full Changelog: 0.15.0-beta.5...0.15.0-beta.6
0.15.0-beta.5
What's Changed
- Updates the
cluster-raft.md
docs to include new Raft configuration settings—addingworker_threads
,node_grpc_batch_size
,node_grpc_client_concurrency_limit
, andnode_grpc_client_timeout
parameters alongside the existingnode_grpc_addrs
list. e56b17e rmqtt-http-api
- Prefixes all HTTP API endpoints with
/api/v1
by updating every route inrmqtt-http-api/src/api.rs
accordingly. 86a8c82
- Prefixes all HTTP API endpoints with
rmqtt-cluster-broadcast
a8ae862- Enables the new
rmqtt-cluster-broadcast
plugin by uncommenting and adding its entries in bothCargo.toml
andrmqtt-bin/Cargo.toml
, including version and workspace metadata. f8113f2 - Adds comprehensive example configurations and startup scripts under
examples/cluster-broadcast
, including plugin TOML files (ACL, auth-http, cluster-broadcast, cluster-raft, HTTP API, retainer, web-hook) and shell/Batch launch scripts across three versioned folders.
- Enables the new
- Optimizes core modules by removing unused availability and task‐count methods in
grpc.rs
, switchingquery_subscriptions
to a reference parameter inshared.rs
, and adding a loggedasync fn notify
inMessageSender
. 6649908 - Wraps the
ENTRYPOINT
in all Dockerfiles with a shell wrapper (sh -c … "$@" --
) to enable forwarding of runtime arguments to thermqttd
binary. 2ee5afc - Refactored plugin registration
- Refactors plugin registration by introducing a new
register_named()
that accepts an explicit name and simplifying the originalregister()
to infer the plugin name viaenv!("CARGO_PKG_NAME")
, with corresponding updates to the build script. 970c333 - Simplifies the example plugin setup by removing explicit plugin name arguments from all
register
calls inexamples/plugin/src/main.rs
, relying solely on boolean flags for registration. 39dfa94
- Refactors plugin registration by introducing a new
Full Changelog: 0.15.0-beta.4...0.15.0-beta.5
0.13.1
What's Changed
- lowercase serde rename for enums and bump version to 0.13.1 by @bittcrafter in #189
Full Changelog: 0.13.0...0.13.1
0.15.0-beta.4
- Remove gRPC client configuration from rmqtt, added gRPC client configuration to rmqtt-plugins/rmqtt-cluster-raft.toml
- Add grpc_server_actives and grpc_clients_actives to stats.rs
- Optimize build version information display
- Improved gRPC handling, add streaming-based message forwarding.
- Forward inter-node messages using gRPC streaming mode.
0.15.0-beta.3
Update Overview
This release introduces a series of systematic optimizations focusing on network stack refactoring, protocol adaptation, deployment flexibility, and feature modularity. Highlights include:
- Refactored the network layer based on the Tokio asynchronous runtime, removing dependency on the
ntex
framework; - Added support for multiple protocols including TCP, TLS, WS, and WSS, with a standardized transport protocol adaptation layer;
- Enabled parallel binding of multiple listeners for heterogeneous network endpoints and internal/external network isolation;
- Provides a library mode for seamless integration into user projects, enabling flexible embedding and on-demand customization;
- Introduced 12 optional feature modules with compile-time selective inclusion;
- Established a standardized plugin extension point mechanism for protocol extension and business logic injection.
1. Modular Refactoring of the Network Layer
The network layer has been completely refactored using Tokio, replacing the ntex
framework and its MQTT implementation with a self-developed asynchronous network stack to improve performance and decouple framework dependencies.
The ntex-mqtt
codec components are retained and optimized to balance protocol maturity and compatibility, enhancing code reusability.
2. Native Multi-Protocol Support
A unified protocol adaptation layer is introduced with full support for TCP, TLS (MQTT over SSL), WebSocket (WS), and its secure variant WSS.
The implementation adheres to standard specifications such as RFC 6455 and RFC 8446, allowing users to flexibly configure access channels according to network environments and security policies.
3. Parallel Listener Binding Mechanism
A single broker instance can launch multiple listeners in parallel, with each listener independently configurable in terms of protocol type, binding address, port, and related parameters.
This allows flexible binding to various network endpoints and protocol channels. Through fine-grained configuration, users can precisely control different networks, protocols, performance, and resource usage to meet high concurrency and multi-scenario deployment requirements.
- Flexible Deployment: Each listener can have custom parameters (e.g., max connections, TLS certificate paths, heartbeat timeouts), supporting diverse deployment scenarios;
- Internal/External Network Isolation: Separate listeners can be used to isolate internal management traffic from external business traffic, enabling clear boundaries and controllable access policies;
- Operations-Friendly: Simplifies integration with load balancers and firewall rules, easing deployment and monitoring configuration.
4. Library Mode Embedding
Released as a crate-level library, rmqtt
can be easily embedded into user services by simply adding it as a Cargo dependency. This integration model supports deep customization and feature trimming, making it ideal for microservices and edge computing scenarios.
To use the RMQTT crate (version 0.15.0-beta.2) in your Rust project, refer to: https://crates.io/crates/rmqtt/0.15.0-beta.2
5. Feature Matrix for Optional Trimming (12 Features)
A modular feature system with 12 components is built under Cargo’s [features]
configuration, supporting flexible compile-time feature combination:
- Reduces unnecessary dependencies and resource consumption;
- Controls the final binary size and improves runtime efficiency;
- Supports minimal integration and deployment scenarios.
6. Plugin-Based Extension Mechanism
A non-intrusive plugin architecture is adopted, defining standardized extension interfaces (Extension Points) to support:
- Runtime hot-plugging of custom components;
- Extending features like authentication, authorization, and message routing without modifying core code;
- Deep customization needs for protocol extension and business logic.
Note: This update strictly preserves the original functional semantics while optimizing architecture and expression. No undisclosed functional modules have been added. All features are traceable to the original design goals.