rabbitmq_message_timestamp

当消息首次进入 RabbitMQ 时添加时间戳的插件。

下载插件

下载地址:https://www.rabbitmq.com/community-plugins.html

https://github.com/rabbitmq/rabbitmq-message-timestamp/releases

安装插件

与所有第三方插件一样,该.ez文件必须放在节点的插件目录中 ,并且可以被 RabbitMQ 进程的有效用户读取。

要找出插件目录是什么,请使用rabbitmq-plugins directories

[root@rabbitmq-1 src]# rabbitmq-plugins directories -s
Plugin archives directory: /usr/lib/rabbitmq/plugins:/usr/lib/rabbitmq/lib/rabbitmq_server-3.10.0/plugins
Plugin expansion directory: /var/lib/rabbitmq/mnesia/rabbit@rabbitmq-1-plugins-expand
Enabled plugins file: /etc/rabbitmq/enabled_plugins

将出输出目录:将上述下载的plugin放到 Plugin archives directory

RabbitMQ 3.10.x
RabbitMQ 3.11.x
mv /usr/local/src/rabbitmq_message_timestamp-v3.11.x.ez /usr/lib/rabbitmq/lib/rabbitmq_server-3.11.15/plugins
RabbitMQ 3.12.x
mv /usr/local/src/rabbitmq_message_timestamp-v3.11.x.ez /usr/lib/rabbitmq/lib/rabbitmq_server-3.11.15/plugins
启用/停用插件

然后运行以下命令:

rabbitmq-plugins enable rabbitmq_message_timestamp
rabbitmq-plugins disable rabbitmq_message_timestamp
作者:Jeebiz  创建时间:2023-04-06 19:44
最后编辑:Jeebiz  更新时间:2024-11-01 10:06