routes 命令

routes 命令

routes 命令用于查询路由信息。

EMQ X 中路由是指主题与节点的映射关系,用于在多个节点之间路由消息。

命令 描述
routes list 列出所有路由
routes show <Topic> 查询指定 Topic 的路由

routes list

列出所有路由:

$ ./bin/emqx_ctl routes list
t2/# -> emqx2@127.0.0.1
t/+/x -> emqx2@127.0.0.1,emqx@127.0.0.1

routes show

查询指定 Topic d的路由:

$ ./bin/emqx_ctl routes show t/+/x
t/+/x -> emqx2@127.0.0.1,emqx@127.0.0.1