Skip to content

[Feature🚀] Implement Controller Command: Re-elect Master (electMaster) #5622

@mxsm

Description

@mxsm

Feature Description

Implement the Controller command electMaster for rocketmq-rust project to manually trigger Broker Master election and promote a specified Broker replica to Master.

This command corresponds to ReElectMasterSubCommand in Apache RocketMQ Java version.

Problem/Motivation

The current rocketmq-rust project lacks Broker Master manual election tools, making it impossible to quickly restore service in the following scenarios:

  1. Failure Recovery: Cannot manually trigger election after current Master node failure
  2. Master-Slave Switchover: Cannot manually promote specified Slave to Master
  3. Operational Adjustments: Cannot manually adjust Master node based on load
  4. High Availability Testing: Cannot verify master-slave switchover functionality

Use Cases:

  • Manually trigger election after Master node failure
  • Specify a particular Broker ID as new Master
  • Load balancing adjustments
  • Disaster recovery drills

Java Source Reference:
https://github.com/apache/rocketmq/blob/develop/tools/src/main/java/org/apache/rocketmq/tools/command/controller/ReElectMasterSubCommand.java

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions