Skip to content

[Enhancement⚡️] Add broker handler for GetAllDelayOffset to expose delay offset data #3906

Closed

Description

@mxsm

Summary
Expose broker-side admin handling for GetAllDelayOffset by wiring the request into AdminBrokerProcessor and implementing OffsetRequestHandler::get_all_delay_offset to return encoded delay offset content.

Motivation

  • Provide an administrative endpoint to retrieve all delay offsets from the broker, useful for monitoring, diagnostics, and slave synchronization steps.

Scope of Changes (files)

  • Modified: rocketmq-broker/src/processor/admin_broker_processor.rs
    • Route RequestCode::GetAllDelayOffset to offset_request_handler.
  • Modified: rocketmq-broker/src/processor/admin_broker_processor/offset_request_handler.rs
    • Implement get_all_delay_offset: encodes schedule message service state and returns it in response body; returns error if empty.

Behavior/Details

  • When invoked with GetAllDelayOffset, broker responds with the serialized delay offset content via schedule_message_service.encode_pretty(false).
  • If there is no delay offset content, returns SystemError with an explanatory remark.

Compatibility/Notes

  • Adds a new handled request type; does not break existing behavior.

Follow-ups

  • Consider adding unit/integration tests for GetAllDelayOffset response formatting and error path.
  • Wire client-side helper in BrokerOuterAPI (if needed) to call this admin endpoint.

Activity

  1. added a commit that references this issue on Aug 31, 2025
  2. added a commit that references this issue on Aug 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions