subscriptions 命令
subscriptions 命令查询消息服务器的订阅 (Subscription) 表。
命令 | 描述 |
---|---|
subscriptions list | 列出所有订阅 |
subscriptions show <ClientId> | 查询指定 ClientId 客户端的订阅 |
subscriptions add <ClientId> <Topic> <QoS> | 手动添加静态订阅 |
subscriptions del <ClientId> <Topic> | 手动删除静态订阅 |
subscriptions list
列出所有订阅:
$ ./bin/emqx_ctl subscriptions list
mosqsub/91042-airlee.lo -> t/y:1
mosqsub/90475-airlee.lo -> t/+/x:2
subscriptions show
查询某个 Client 的订阅:
$ ./bin/emqx_ctl subscriptions show 'mosqsub/90475-airlee.lo'
mosqsub/90475-airlee.lo -> t/+/x:2
subscriptions add
手动添加订阅关系:
$ ./bin/emqx_ctl subscriptions add 'mosqsub/90475-airlee.lo' '/world' 1
ok
subscriptions del
手动删除订阅关系:
$ ./bin/emqx_ctl subscriptions del 'mosqsub/90475-airlee.lo' '/world'
ok