Skip to content

Incorrect usage of updatetopic in quickstart #394

@WesleyOne

Description

@WesleyOne

RocketMQ版本5.0.0

中/英文的快速开始章节的如下位置updatetopic命令使用有误。
https://rocketmq.apache.org/zh/docs/quickStart/02quickstart
5.SDK测试消息收发

$ sh bin/mqadmin updatetopic -n localhost:9876 -t TestTopic

执行后,返回的命令使用介绍,没有创建topic。如图:
截屏2022-12-08 22 33 19

看源码org.apache.rocketmq.tools.command.topic.UpdateTopicSubCommand#execute,确认updatetopic必须指定-bBroker地址或-c集群名称,在本章节可以改成指定默认集群名称解决问题,如下命令:

sh bin/mqadmin updatetopic -n localhost:9876 -t TestTopic -c DefaultCluster

测试可行,如图:
截屏2022-12-08 22 37 18

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions