-
Notifications
You must be signed in to change notification settings - Fork 261
Description
Programming Language of the Client
Rust
Is Your Feature Request Related to a Problem?
Yes. The RocketMQ Rust client currently does not provide a public API for checking the health status of the client instance, specifically whether the client is maintaining a healthy heartbeat with the broker cluster.
In RocketMQ, tools like mqadmin offer health check capabilities to help users monitor and diagnose the status of their messaging infrastructure. However, the Rust client library lacks a similar feature, making it difficult for applications to determine programmatically whether the client is connected and functioning properly.
Describe the Solution You'd Like
Introduce a public API (e.g., is_heartbeat_healthy()) to the RocketMQ Rust client and all wrapper types (PushConsumer, Producer, SimpleConsumer). This API will allow users to check if the client is currently maintaining a healthy heartbeat with the broker. The heartbeat status is updated periodically (every 30 seconds) by the client background task and is initialized as unhealthy on client creation.
Describe Alternatives You've Considered
- Sending health check requests via RocketMQ's mqadmin tool interface. However, this interface is currently not exposed to clients and cannot be used directly for health detection in the Rust client.
- Creating a dedicated topic for heartbeat message sending and receiving to monitor client and server health status. This approach requires maintaining an additional heartbeat topic, separate from business topics, which increases operational and business complexity.
Additional Context
No response