Skip to content

[Enhancement⚡️] Add simple broker config templates (master and slave) under distribution/config/broker #3813

Closed

Description

@mxsm

Summary

  • Add ready-to-use broker configuration templates to simplify local setup and demos:
    • distribution/config/broker/broker-simple-master.toml (new)
    • distribution/config/broker/broker-simple-slave.toml (new)

Motivation

  • Provide an out-of-the-box experience for running a single master or a master–slave pair without hand-crafting configs.
  • Standardize default ports and paths for examples, CI, and docs (e.g., listenPort=10911, haListenPort=10912, storePathRootDir=/opt/rocketmq/store).
  • Reduce friction for contributors validating features across modules (broker, namesrv, client examples).

Describe the Solution You'd Like

  • Keep the two TOML templates in distribution/config/broker/ with minimal, sane defaults:
    • Master: brokerId=0, brokerRole=ASYNC_MASTER (default), flushDiskType=ASYNC_FLUSH, listen/HA ports 10911/10912.
    • Slave: brokerId>0 (e.g., 1), brokerRole=SLAVE, haMasterAddress set to the master’s HA port, same store path by default.
  • Include brief comments in-place to hint valid enum values and typical adjustments (cluster name, broker name, storage paths).

Describe Alternatives You've Considered

  • Relying only on README snippets (harder to copy correctly, not executable).
  • Generating configs via a CLI command (could be added later; templates are simpler to start with).

Additional Context

  • Current additions detected in the working tree:
    • distribution/config/broker/broker-simple-master.toml
    • distribution/config/broker/broker-simple-slave.toml
  • Note: broker-simple-slave.toml presently has brokerRole set to "ASYNC_MASTER" while the filename suggests a slave profile. Suggest setting brokerRole to "SLAVE" for consistency and correctness. Example:
    • Expected in slave:
      brokerRole = "SLAVE"
      brokerId = 1
      haMasterAddress = "127.0.0.1:10912"

Happy to submit a follow-up PR to align the slave template and add a short README snippet on how to use these templates with namesrv and broker processes.

Activity

  1. added a commit that references this issue on Aug 23, 2025
  2. added a commit that references this issue on Aug 23, 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