Closed mxsm closed 1 month ago
🚀Thanks for your contribution🎉. CodeRabbit(AI) will review your code first🔥
The recent changes to the RocketMQ broker enhance its performance and configurability, particularly in message processing and connection handling. Notable improvements include the introduction of new configurations for message storage, refined logging practices, optimized asynchronous processing, and adjustments for better resource management. These modifications aim to resolve existing performance issues and create a more responsive messaging system.
Files | Change Summary |
---|---|
rocketmq-broker/Cargo.toml |
Added num_cpus dependency for enhanced CPU core management. |
rocketmq-broker/src/broker_runtime.rs |
Added message_store_config.clone() to DefaultPullMessageResultHandler instantiation. |
rocketmq-broker/src/long_polling/.../pull_request_hold_service.rs |
Commented out logging statement to suppress visibility of topic and queue ID during hold request checks. |
rocketmq-broker/src/processor/default_pull_message_result_handler.rs , rocketmq-broker/src/processor/pull_message_processor.rs |
Introduced message_store_config field, modified response handling for offset management, and added runtime management for better async handling. |
rocketmq-remoting/src/connection.rs |
Updated Connection constructor to use Framed::with_capacity for optimized buffer management. |
rocketmq-remoting/src/protocol.rs , rocketmq-remoting/src/protocol/topic.rs |
Added new public module topic and defined OffsetMovedEvent structure for tracking message offsets. |
rocketmq-remoting/src/runtime/server.rs |
Added a line to set TCP socket's "no delay" option for improved performance. |
rocketmq-store/src/message_store/default_message_store.rs |
Reduced timing intervals for asynchronous tasks to enhance responsiveness. |
sequenceDiagram
participant Client
participant Broker
participant MessageStore
Client->>Broker: Send Message Request
Broker->>MessageStore: Retrieve Message
MessageStore-->>Broker: Return Message
Broker->>Client: Deliver Message
Note over Broker: New configurations enhance processing
Objective | Addressed | Explanation |
---|---|---|
Broker can't push messages to clients timely (837) | ✅ |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 0%
with 83 lines
in your changes missing coverage. Please review.
Project coverage is 27.11%. Comparing base (
4c80786
) to head (3a52384
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
🚀Thanks for your contribution🎉. CodeRabbit(AI) will review your code first🔥
Which Issue(s) This PR Fixes(Closes)
Fixes #837
Brief Description
How Did You Test This Change?
Summary by CodeRabbit
New Features
OffsetMovedEvent
structure for better tracking of message offsets.topic
module to improve modularity and organization of code.Bug Fixes
Performance Improvements
Chores