php-rabbitmq结合rabbitmq_delayed_message_exchange实现延时队列

1

#查看插件列表
rabbitmq-plugins list
#如果未安装,则下载
wget https://dl.bintray.com/rabbitmq/community-plugins/3.7.x/rabbitmq_delayed_message_exchange/rabbitmq_delayed_message_exchange-20171201-3.7.x.zip
#解压
unzip rabbitmq_delayed_message_exchange-20171201-3.7.x.zip
#移动到rabbitmq plugins文件夹中,本机的rabbitmq是docker容器,plugins文件夹位于/plugins
mv rabbitmq_delayed_message_exchange-20171201-3.7.x.ez ./plugins
#启用rabbitmq_delayed_message_exchange插件
rabbitmq-plugins enable rabbitmq_delayed_message_exchange
#查看插件启用情况
rabbitmq-plugins list

重启rabbitmq

2,php-rabbitmq(自行composer安装)

你可能感兴趣的:(PHP)