Skip to content

[Issue #6416] Feature🚀 Implement ResetOffsetByTime Command for Time-Based Offset#6505

Merged
mxsm merged 1 commit intomxsm:mainfrom
MasterOogway1466:feat-6416
Feb 24, 2026
Merged

[Issue #6416] Feature🚀 Implement ResetOffsetByTime Command for Time-Based Offset#6505
mxsm merged 1 commit intomxsm:mainfrom
MasterOogway1466:feat-6416

Conversation

@MasterOogway1466
Copy link
Contributor

@MasterOogway1466 MasterOogway1466 commented Feb 24, 2026

Which Issue(s) This PR Fixes(Closes)

Brief Description

Implements the resetOffsetByTime command in the rocketmq-admin-core crate, inspired from the Java reference implementation.

How Did You Test This Change?

Code is building with no warnings from clippy and I can see the command from rocketmq-admin-cli-rust

Summary by CodeRabbit

Release Notes

  • New Features
    • Added Offset command group with a new resetOffsetByTime command, enabling consumer group offset reset to a specific timestamp without requiring a client restart. Supports multiple timestamp formats and provides detailed per-queue reset summaries.

@rocketmq-rust-robot rocketmq-rust-robot added the feature🚀 Suggest an idea for this project. label Feb 24, 2026
@rocketmq-rust-bot
Copy link
Collaborator

🔊@MasterOogway1466 🚀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💥.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 24, 2026

Walkthrough

Introduces a new offset command group for RocketMQ admin core. Adds a ResetOffsetByTime subcommand that resets consumer group offsets to a specified timestamp, with fallback support for legacy API when the new method is unavailable. Implements command dispatch routing, timestamp parsing, and broker-level offset reset operations.

Changes

Cohort / File(s) Summary
Command Registration
rocketmq-tools/rocketmq-admin/rocketmq-admin-core/src/commands.rs
Integrates new Offset command variant into top-level command dispatch and documentation table, adding support for resetOffsetByTime command routing.
Offset Command Module
rocketmq-tools/rocketmq-admin/rocketmq-admin-core/src/commands/offset.rs
Establishes OffsetCommands enum with ResetOffsetByTime variant and CommandExecute trait implementation for command dispatch routing.
ResetOffsetByTime Implementation
rocketmq-tools/rocketmq-admin/rocketmq-admin-core/src/commands/offset/reset_offset_by_time_sub_command.rs
Implements CLI command logic including timestamp parsing (supports "now", milliseconds, and formatted strings), broker API interaction with fallback from new resetOffsetByTimestamp to legacy resetOffsetByTimestampOld, and human-readable output formatting.

Sequence Diagram

sequenceDiagram
    participant User as User/CLI
    participant Dispatch as Command Dispatcher
    participant OffsetCmd as OffsetCommands
    participant ResetCmd as ResetOffsetByTimeSubCommand
    participant Admin as DefaultMQAdminExt
    participant Broker as Broker API

    User->>Dispatch: Execute offset command
    Dispatch->>OffsetCmd: Route to ResetOffsetByTime
    OffsetCmd->>ResetCmd: Dispatch via CommandExecute
    ResetCmd->>ResetCmd: Parse timestamp & validate inputs
    ResetCmd->>Admin: Start admin client
    ResetCmd->>Admin: Call resetOffsetByTimestamp (new API)
    Admin->>Broker: Reset offset by timestamp
    alt API Supported
        Broker-->>Admin: Success with per-queue results
        Admin-->>ResetCmd: Return offset mappings
        ResetCmd->>User: Print detailed per-queue summary
    else API Unsupported/Fallback
        Broker-->>Admin: Failure or offline consumers
        ResetCmd->>Admin: Call resetOffsetByTimestampOld (legacy)
        Admin->>Broker: Reset offset (legacy, requires restart)
        Broker-->>Admin: Success with offset table
        Admin-->>ResetCmd: Return legacy offset data
        ResetCmd->>User: Print legacy fallback table
    end
    ResetCmd->>Admin: Shutdown admin client
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 Through timestamps we hop, with whiskers held high,
Offsets reset like moonlight across the sky,
When brokers say no, we fallback with grace,
Consumer groups dance through time and through space!
✨ 🕐

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR implements core functionality (ResetOffsetByTime command with timestamp parsing and offset reset) but lacks several required features including optional parameters, queue-specific modes, exact-offset modes, and comprehensive error handling for out-of-range scenarios. Add support for optional CLI parameters (--force, --broker, --queue, --offset, --cluster), implement queue-specific and exact-offset reset modes, and enhance error handling for edge cases like out-of-range offsets and future timestamps.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly indicates the main change: implementing a ResetOffsetByTime command for time-based offset management in RocketMQ.
Out of Scope Changes check ✅ Passed The changes are narrowly focused on implementing the offset command within the rocketmq-admin-core module and do not introduce unrelated modifications.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@rocketmq-tools/rocketmq-admin/rocketmq-admin-core/src/commands/offset/reset_offset_by_time_sub_command.rs`:
- Around line 219-253: Before calling Self::reset_topic_level in
ResetOffsetByTimeSubCommand::execute, add explicit existence checks for the
consumer group and topic using the admin client (DefaultMQAdminExt) after
admin.start() succeeds; call the appropriate admin query methods to verify the
group exists (returning RocketMQError::IllegalArgument with a clear message if
missing) and to verify the topic exists (similarly returning an error if
missing), and only then proceed to call reset_topic_level; ensure any admin call
failures translate to RocketMQError::Internal with contextual text referencing
ResetOffsetByTimeSubCommand.
- Around line 127-163: The current Err(e) arm always falls back to
Self::reset_topic_level_old which can hide real errors; change the Err handling
so you inspect the error returned by admin.reset_offset_by_timestamp (e.g., via
error kind, status code, or pattern match on the error type) and only call
Self::reset_topic_level_old(admin, group, topic, timestamp).await for
broker-offline/unsupported/legacy-capability errors, while returning Err(e) (or
propagating the original error) for other cases like invalid timestamp, auth
failures, or topic/group not found; keep references to the existing symbols
reset_offset_by_timestamp and reset_topic_level_old and use the error’s
discriminants (e.g., is_offline(), is_unsupported(), specific variant names) to
decide whether to fallback.
- Around line 83-105: The ResetOffsetByTimeSubCommand struct only defines group,
topic and timestamp but must also expose the additional CLI flags and modes
required by the change: add boolean/flag fields for force (e.g., force: bool),
broker (broker: Option<String>), queue (queue: Option<u32>), offset (offset:
Option<i64>), and LMQ mode flags cluster and cplus (e.g., cluster: bool, cplus:
bool), plus an enum or flags to select queue-level vs exact-offset reset modes;
update ResetOffsetByTimeSubCommand to include these new fields with appropriate
#[arg(...)] annotations and required/optional settings, then propagate those new
members into the command handling code that performs the reset (where
ResetOffsetByTimeSubCommand is consumed) to implement broker-scoped,
queue-scoped, exact-offset, force, and LMQ cluster/cplus flows. Ensure help text
matches the new options and that parsing and downstream logic use the new fields
to drive the different reset flows.
- Around line 31-65: Update TIMESTAMP_FORMAT to use "%.3f" (matching
format_timestamp) and adjust the documented example accordingly; in
parse_timestamp (function parse_timestamp) change the NaiveDateTime parsing
format constant to the new TIMESTAMP_FORMAT and after computing millis compare
against current time (get_current_millis()) to reject future timestamps by
returning a RocketMQError::IllegalArgument when millis > now; also update the
final error message text to reflect the corrected documented format
"yyyy-MM-dd#HH:mm:ss.SSS" so it matches the parser/formatter.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 93009eb and 2c66e32.

📒 Files selected for processing (3)
  • rocketmq-tools/rocketmq-admin/rocketmq-admin-core/src/commands.rs
  • rocketmq-tools/rocketmq-admin/rocketmq-admin-core/src/commands/offset.rs
  • rocketmq-tools/rocketmq-admin/rocketmq-admin-core/src/commands/offset/reset_offset_by_time_sub_command.rs

Comment on lines +31 to +65
/// Timestamp format used by the Java reference implementation.
const TIMESTAMP_FORMAT: &str = "%Y-%m-%d#%H:%M:%S:%3f";

/// Parse a timestamp string in one of the three supported forms:
/// - `"now"` → current system time in milliseconds
/// - a plain decimal integer → milliseconds since epoch
/// - `"yyyy-MM-dd#HH:mm:ss:SSS"` formatted string
fn parse_timestamp(s: &str) -> RocketMQResult<u64> {
let s = s.trim();
if s.eq_ignore_ascii_case("now") {
return Ok(get_current_millis());
}
// Try parsing as plain milliseconds integer first.
if let Ok(ms) = s.parse::<u64>() {
return Ok(ms);
}
// Try parsing as formatted datetime string.
if let Ok(ndt) = NaiveDateTime::parse_from_str(s, TIMESTAMP_FORMAT) {
let millis = Local
.from_local_datetime(&ndt)
.single()
.ok_or_else(|| RocketMQError::IllegalArgument(format!("Ambiguous local datetime: {s}")))?
.timestamp_millis();
if millis < 0 {
return Err(RocketMQError::IllegalArgument(format!(
"Parsed timestamp is negative (before epoch): {millis}"
)));
}
return Ok(millis as u64);
}
Err(RocketMQError::IllegalArgument(format!(
"Cannot parse timestamp '{}'. Supported formats: 'now', milliseconds (integer), 'yyyy-MM-dd#HH:mm:ss:SSS'",
s
)))
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

chrono Rust format specifier milliseconds %3f %.3f difference yyyy-MM-dd HH:mm:ss SSS

💡 Result:

In Rust chrono’s strftime syntax, the two millisecond-ish specifiers differ only in whether they include the decimal point:

  • %.3ffractional seconds with a leading dot, fixed 3 digits (e.g. .026) (docs.rs)
  • %3ffractional seconds without the dot, fixed 3 digits (e.g. 026) (docs.rs)

So the Java-style pattern:

  • yyyy-MM-dd HH:mm:ss SSS

is equivalent in chrono to either of these:

  • "%Y-%m-%d %H:%M:%S%.3f" (the dot comes from %.3f) (docs.rs)
  • "%Y-%m-%d %H:%M:%S.%3f" (you type the dot, then %3f) (docs.rs)

Notes:

  • In chrono, %f is 9 digits (nanoseconds); %3f/%6f/%9f control width, and %.3f/%.6f/%.9f include the dot. (docs.rs)

Citations:


🏁 Script executed:

find . -name "reset_offset_by_time_sub_command.rs" -type f | head -5

Repository: mxsm/rocketmq-rust

Length of output: 169


🏁 Script executed:

cat -n "rocketmq-tools/rocketmq-admin/rocketmq-admin-core/src/commands/offset/reset_offset_by_time_sub_command.rs" | head -100

Repository: mxsm/rocketmq-rust

Length of output: 4535


🏁 Script executed:

cat -n "rocketmq-tools/rocketmq-admin/rocketmq-admin-core/src/commands/offset/reset_offset_by_time_sub_command.rs" | sed -n '100,200p'

Repository: mxsm/rocketmq-rust

Length of output: 4534


🏁 Script executed:

cat -n "rocketmq-tools/rocketmq-admin/rocketmq-admin-core/src/commands/offset/reset_offset_by_time_sub_command.rs" | sed -n '200,250p'

Repository: mxsm/rocketmq-rust

Length of output: 2177


🏁 Script executed:

rg -i "6416\|future.*timestamp\|reject.*future" --max-count=10

Repository: mxsm/rocketmq-rust

Length of output: 44


Add future timestamp validation and fix millisecond format inconsistency.

The parse_timestamp function lacks validation to reject future timestamps. Additionally, there's a format mismatch: the parse function uses %3f (expecting input like 14:30:45:123 with no dot), while format_timestamp outputs %.3f (producing 14:30:45.123 with a dot). These should be consistent. Use %.3f in both and update the documented format string and example accordingly.

✅ Proposed fix
/// Timestamp format used by the Java reference implementation.
-const TIMESTAMP_FORMAT: &str = "%Y-%m-%d#%H:%M:%S:%3f";
+const TIMESTAMP_FORMAT: &str = "%Y-%m-%d#%H:%M:%S%.3f";

/// Parse a timestamp string in one of the three supported forms:
///   - `"now"`  → current system time in milliseconds
///   - a plain decimal integer → milliseconds since epoch
-///   - `"yyyy-MM-dd#HH:mm:ss:SSS"` formatted string
+///   - `"yyyy-MM-dd#HH:mm:ss.SSS"` formatted string (e.g. `2024-02-19#10:00:00.000`)
fn parse_timestamp(s: &str) -> RocketMQResult<u64> {
     let s = s.trim();
-    if s.eq_ignore_ascii_case("now") {
-        return Ok(get_current_millis());
-    }
-    // Try parsing as plain milliseconds integer first.
-    if let Ok(ms) = s.parse::<u64>() {
-        return Ok(ms);
-    }
-    // Try parsing as formatted datetime string.
-    if let Ok(ndt) = NaiveDateTime::parse_from_str(s, TIMESTAMP_FORMAT) {
-        let millis = Local
+    let ms = if s.eq_ignore_ascii_case("now") {
+        get_current_millis()
+    } else if let Ok(ms) = s.parse::<u64>() {
+        ms
+    } else if let Ok(ndt) = NaiveDateTime::parse_from_str(s, TIMESTAMP_FORMAT) {
+        let millis = Local
             .from_local_datetime(&ndt)
             .single()
             .ok_or_else(|| RocketMQError::IllegalArgument(format!("Ambiguous local datetime: {s}")))?
             .timestamp_millis();
         if millis < 0 {
             return Err(RocketMQError::IllegalArgument(format!(
                 "Parsed timestamp is negative (before epoch): {millis}"
             )));
         }
-        return Ok(millis as u64);
-    }
-    Err(RocketMQError::IllegalArgument(format!(
-        "Cannot parse timestamp '{}'. Supported formats: 'now', milliseconds (integer), 'yyyy-MM-dd#HH:mm:ss:SSS'",
-        s
-    )))
+        millis as u64
+    } else {
+        return Err(RocketMQError::IllegalArgument(format!(
+            "Cannot parse timestamp '{}'. Supported formats: 'now', milliseconds (integer), 'yyyy-MM-dd#HH:mm:ss.SSS'",
+            s
+        )));
+    };
+
+    let now = get_current_millis();
+    if ms > now {
+        return Err(RocketMQError::IllegalArgument(format!(
+            "Timestamp {ms} is in the future (current time: {now})"
+        )));
+    }
+    Ok(ms)
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@rocketmq-tools/rocketmq-admin/rocketmq-admin-core/src/commands/offset/reset_offset_by_time_sub_command.rs`
around lines 31 - 65, Update TIMESTAMP_FORMAT to use "%.3f" (matching
format_timestamp) and adjust the documented example accordingly; in
parse_timestamp (function parse_timestamp) change the NaiveDateTime parsing
format constant to the new TIMESTAMP_FORMAT and after computing millis compare
against current time (get_current_millis()) to reject future timestamps by
returning a RocketMQError::IllegalArgument when millis > now; also update the
final error message text to reflect the corrected documented format
"yyyy-MM-dd#HH:mm:ss.SSS" so it matches the parser/formatter.

Comment on lines +83 to +105
#[derive(Debug, Clone, Parser)]
pub struct ResetOffsetByTimeSubCommand {
#[command(flatten)]
common_args: CommonArgs,

/// Consumer group name.
#[arg(short = 'g', long = "group", required = true, help = "consumer group name")]
group: String,

/// Topic name.
#[arg(short = 't', long = "topic", required = true, help = "topic name")]
topic: String,

/// Target timestamp. Accepts: `now`, milliseconds since epoch, or
/// `yyyy-MM-dd#HH:mm:ss:SSS` (e.g. `2024-02-19#10:00:00:000`).
#[arg(
short = 's',
long = "timestamp",
required = true,
help = "target timestamp: 'now', milliseconds, or 'yyyy-MM-dd#HH:mm:ss:SSS'"
)]
timestamp: String,
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

CLI surface is missing required flags and reset modes from #6416.

The subcommand only exposes --group, --topic, and --timestamp, but the issue requires --force, --broker, --queue, --offset, and LMQ --cluster/--cplus, plus queue-level and exact-offset modes. As implemented, these flows are not possible.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@rocketmq-tools/rocketmq-admin/rocketmq-admin-core/src/commands/offset/reset_offset_by_time_sub_command.rs`
around lines 83 - 105, The ResetOffsetByTimeSubCommand struct only defines
group, topic and timestamp but must also expose the additional CLI flags and
modes required by the change: add boolean/flag fields for force (e.g., force:
bool), broker (broker: Option<String>), queue (queue: Option<u32>), offset
(offset: Option<i64>), and LMQ mode flags cluster and cplus (e.g., cluster:
bool, cplus: bool), plus an enum or flags to select queue-level vs exact-offset
reset modes; update ResetOffsetByTimeSubCommand to include these new fields with
appropriate #[arg(...)] annotations and required/optional settings, then
propagate those new members into the command handling code that performs the
reset (where ResetOffsetByTimeSubCommand is consumed) to implement
broker-scoped, queue-scoped, exact-offset, force, and LMQ cluster/cplus flows.
Ensure help text matches the new options and that parsing and downstream logic
use the new fields to drive the different reset flows.

Comment on lines +127 to +163
let result = admin
.reset_offset_by_timestamp(None, topic.into(), group.into(), timestamp, false)
.await;

match result {
Ok(offset_map) => {
let mut entries: Vec<_> = offset_map.iter().collect();
entries.sort_by(|(a, _), (b, _)| {
a.broker_name()
.cmp(b.broker_name())
.then_with(|| a.queue_id().cmp(&b.queue_id()))
});

for (mq, new_offset) in &entries {
println!(
"Broker: {:<35} Queue: {:<6} New Offset: {}",
mq.broker_name(),
mq.queue_id(),
new_offset
);
}

println!();
println!("{}", "-".repeat(50));
println!("Reset Summary:");
println!(" Total Queues: {}", entries.len());
println!(" All offsets reset to timestamp: {}", format_timestamp(timestamp));
println!();
println!("Note: Consumers will automatically resume from new offsets (no restart required)");
Ok(())
}
Err(e) => {
// Attempt the legacy fallback path.
eprintln!("New reset method failed ({e}). Trying legacy method…");
Self::reset_topic_level_old(admin, group, topic, timestamp).await
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fallback should be limited to offline/unsupported errors.

The new method fallback triggers on any error, which can mask real failures (invalid timestamp, auth, topic/group not found) and still runs the legacy method. Limit fallback to the specific broker/offline/unsupported cases and surface other errors directly.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@rocketmq-tools/rocketmq-admin/rocketmq-admin-core/src/commands/offset/reset_offset_by_time_sub_command.rs`
around lines 127 - 163, The current Err(e) arm always falls back to
Self::reset_topic_level_old which can hide real errors; change the Err handling
so you inspect the error returned by admin.reset_offset_by_timestamp (e.g., via
error kind, status code, or pattern match on the error type) and only call
Self::reset_topic_level_old(admin, group, topic, timestamp).await for
broker-offline/unsupported/legacy-capability errors, while returning Err(e) (or
propagating the original error) for other cases like invalid timestamp, auth
failures, or topic/group not found; keep references to the existing symbols
reset_offset_by_timestamp and reset_topic_level_old and use the error’s
discriminants (e.g., is_offline(), is_unsupported(), specific variant names) to
decide whether to fallback.

Comment on lines +219 to +253
impl CommandExecute for ResetOffsetByTimeSubCommand {
async fn execute(&self, _rpc_hook: Option<Arc<dyn RPCHook>>) -> RocketMQResult<()> {
// ── Validate arguments ───────────────────────────────────────────────
let group = self.group.trim();
if group.is_empty() {
return Err(RocketMQError::IllegalArgument(
"Consumer group name (--group / -g) cannot be empty".into(),
));
}

let topic = self.topic.trim();
if topic.is_empty() {
return Err(RocketMQError::IllegalArgument(
"Topic name (--topic / -t) cannot be empty".into(),
));
}

let timestamp = parse_timestamp(&self.timestamp)?;

// ── Initialise admin client ───────────────────────────────────────────
let mut admin = DefaultMQAdminExt::new();
admin
.client_config_mut()
.set_instance_name(get_current_millis().to_string().into());

if let Some(addr) = &self.common_args.namesrv_addr {
admin.set_namesrv_addr(addr.trim());
}

admin.start().await.map_err(|e| {
RocketMQError::Internal(format!("ResetOffsetByTimeSubCommand: Failed to start MQAdminExt: {e}"))
})?;

let result = Self::reset_topic_level(&mut admin, group, topic, timestamp).await;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Validate consumer group and topic existence before resetting.

The issue requires validating that the consumer group and topic exist. The current flow proceeds without those checks, which can lead to confusing broker errors or unintended legacy fallback. Consider validating via admin calls before the reset.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@rocketmq-tools/rocketmq-admin/rocketmq-admin-core/src/commands/offset/reset_offset_by_time_sub_command.rs`
around lines 219 - 253, Before calling Self::reset_topic_level in
ResetOffsetByTimeSubCommand::execute, add explicit existence checks for the
consumer group and topic using the admin client (DefaultMQAdminExt) after
admin.start() succeeds; call the appropriate admin query methods to verify the
group exists (returning RocketMQError::IllegalArgument with a clear message if
missing) and to verify the topic exists (similarly returning an error if
missing), and only then proceed to call reset_topic_level; ensure any admin call
failures translate to RocketMQError::Internal with contextual text referencing
ResetOffsetByTimeSubCommand.

@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 0% with 156 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.17%. Comparing base (33efdf4) to head (2c66e32).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...ommands/offset/reset_offset_by_time_sub_command.rs 0.00% 146 Missing ⚠️
...rocketmq-admin/rocketmq-admin-core/src/commands.rs 0.00% 6 Missing ⚠️
...q-admin/rocketmq-admin-core/src/commands/offset.rs 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6505      +/-   ##
==========================================
- Coverage   42.18%   42.17%   -0.01%     
==========================================
  Files         942      946       +4     
  Lines      131785   132075     +290     
==========================================
+ Hits        55595    55706     +111     
- Misses      76190    76369     +179     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Owner

@mxsm mxsm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mxsm mxsm merged commit f53d131 into mxsm:main Feb 24, 2026
9 of 20 checks passed
@rocketmq-rust-bot rocketmq-rust-bot added approved PR has approved and removed ready to review waiting-review waiting review this PR labels Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI review first Ai review pr first approved PR has approved auto merge feature🚀 Suggest an idea for this project.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature🚀] Implement ResetOffsetByTime Command for Time-Based Offset Reset

4 participants