-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ISSUE #2855]🚀Add ScheduleMessageHook to MessageStore💫 #2856
Conversation
WalkthroughThe changes integrate the newly created Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client
participant BR as BrokerRuntime
participant SMH as ScheduleMessageHook
participant MS as MessageStore
Client->>BR: register_message_store_hook()
BR->>SMH: new(cloned broker_runtime_inner)
SMH-->>BR: Hook instance created
BR->>MS: Register ScheduleMessageHook
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code Definitions (2)rocketmq-broker/src/hook/schedule_message_hook.rs (1)
rocketmq-broker/src/broker_runtime.rs (7)
⏰ Context from checks skipped due to timeout of 90000ms (9)
🔇 Additional comments (3)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
🔊@mxsm 🚀Thanks for your contribution🎉! 💡CodeRabbit(AI) will review your code first🔥! Note 🚨The code review suggestions from CodeRabbit are to be used as a reference only, and the PR submitter can decide whether to make changes based on their own judgment. Ultimately, the project management personnel will conduct the final code review💥. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new ScheduleMessageHook to the MessageStore as part of the resolution for ISSUE #2855. It introduces a new hook in the schedule_message_hook.rs file and registers it in the broker_runtime to be used during message processing.
- Added a new ScheduleMessageHook implementation with a constructor in schedule_message_hook.rs.
- Updated broker_runtime.rs to import and register the new hook.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
rocketmq-broker/src/hook/schedule_message_hook.rs | Introduces the ScheduleMessageHook and its constructor. |
rocketmq-broker/src/broker_runtime.rs | Imports and registers the ScheduleMessageHook in the message store hook chain. |
Comments suppressed due to low confidence (1)
rocketmq-broker/src/broker_runtime.rs:504
- Multiple calls to 'set_put_message_hook' might override each other if the implementation does not support chaining. Consider verifying or updating the hook registration mechanism to ensure that all intended hooks are executed.
.set_put_message_hook(Box::new(ScheduleMessageHook::new(broker_runtime_inner)))
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2856 +/- ##
==========================================
- Coverage 27.55% 27.55% -0.01%
==========================================
Files 527 527
Lines 78046 78054 +8
==========================================
Hits 21504 21504
- Misses 56542 56550 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Which Issue(s) This PR Fixes(Closes)
Fixes #2855
Brief Description
How Did You Test This Change?
Summary by CodeRabbit
New Features
Refactor