retainer 命令

retainer 命令

命令 描述
retainer info 显示保留消息的数量
retainer topics 显示当前存储的保留消息的所有主题
retainer clean 清除所有保留的消息
retainer clean <Topic> 清除指定的主题下的保留的消息

retainer info

显示保留消息的数量:

$ ./bin/emqx_ctl retainer info
retained/total: 3

retainer topics

显示当前存储的保留消息的所有主题:

$ ./bin/emqx_ctl retainer topics
$SYS/brokers/emqx@127.0.0.1/version
$SYS/brokers/emqx@127.0.0.1/sysdescr
$SYS/brokers

retainer clean

清除所有保留的消息:

$ ./bin/emqx_ctl retainer clean
Cleaned 3 retained messages

retainer clean

清除指定的主题下的保留的消息:

$ ./bin/emqx_ctl retainer clean topic
Cleaned 1 retained messages