Closed mxsm closed 4 months ago
The recent updates in the rocketmq-remoting
project focus on enhancing retry policies and optimizing the SubscriptionGroupConfig
struct. Key changes include adding the duration_constructors
feature, new retry policy modules, and comprehensive methods for setting and getting fields within configuration structures. The main objective is to introduce flexible and customizable retry strategies along with an improved default method for SubscriptionGroupConfig
.
File(s) | Change Summary |
---|---|
rocketmq-remoting/src/lib.rs |
Added #![feature(duration_constructors)] |
rocketmq-remoting/src/protocol/subscription.rs |
Introduced customized_retry_policy , exponential_retry_policy , group_retry_policy_type , and retry_policy modules |
rocketmq-remoting/src/protocol/subscription/customized_retry_policy.rs |
Added CustomizedRetryPolicy with sequence-based delay durations and RetryPolicy implementation |
rocketmq-remoting/src/protocol/subscription/exponential_retry_policy.rs |
Implemented ExponentialRetryPolicy with exponential backoff logic and corresponding tests |
rocketmq-remoting/src/protocol/subscription/group_retry_policy.rs |
Enhanced GroupRetryPolicy to support type-specific retry policies with getter/setter methods |
rocketmq-remoting/src/protocol/subscription/group_retry_policy_type.rs |
Introduced GroupRetryPolicyType enum with serialization/deserialization and unit tests |
rocketmq-remoting/src/protocol/subscription/retry_policy.rs |
Defined RetryPolicy trait for calculating next delay durations based on reconsume times |
rocketmq-remoting/src/protocol/subscription/subscription_group_config.rs |
Optimized SubscriptionGroupConfig by making fields optional, adding initialization method, and improving default implementation |
Objective (Issue #731) | Addressed | Explanation |
---|---|---|
Optimize SubscriptionGroupConfig default method |
✅ |
In RocketMQ’s vast domain,
Retry policies weave their chain.
From exponential heights we stride,
To custom delays, let's glide.
Configs now with options bright,
Optimized with pure delight.
Code enhanced, a rabbit's cheer,
For RocketMQ, the future’s clear!
[!TIP]
AI model upgrade
## `gpt-4o` model for reviews and chat is now live OpenAI claims that this model is better at understanding and generating code than the previous models. Please join our [Discord Community](https://discord.com/invite/GsXnASn26c) to provide any feedback or to report any issues.
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?
🚀Thanks for your contribution🎉. CodeRabbit(AI) will review your code first🔥
Which Issue(s) This PR Fixes(Closes)
Fixes #731
Brief Description
How Did You Test This Change?
Summary by CodeRabbit
New Features
Improvements
SubscriptionGroupConfig
struct for better initialization and field management.Bug Fixes
Tests
SubscriptionGroupConfig
to ensure reliability and correctness.