Skip to content

RocketMQProperties#nameServer should offer a more user-friendly format #8

@snicoll

Description

@snicoll

The nameServer property ultimately maps to ClientConfig#setNamesrvAddr that requires a host:port pair separated by ;

I think it would be nicer to not expose that complexity back to the configuration. Rather, the configuration should expose a List<String> where each item represent a host:port pair.

There are several advantages to this:

  • Each pair can be checked individually and an exception can be thrown if its format is invalid
  • YAML configuration is much more readable as you can use the native list format
  • Perhaps the property can be renamed to servers to express it is a list

Taking this into consideration (+ #9) the property can be configured as follows:

rocketmq:
  servers:
    - 10.0.0.1:9876
    - 10.0.0.2:9876

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions