php rabbitmq 队列持久化,消息持久化
时间:2024-1-13 10:27 作者:xiang 分类: php
ubuntu停止rabbitmq
service rabbitmq-server stop
ubuntu启动rabbitmq
service rabbitmq-server start
queue队列持久化
$channel->queue_declare($queue, false, true, false, false);
durable = true 队列持久化
message消息持久化
$msg = new AMQPMessage('Hello World!'.$time, array('delivery_mode' => AMQPMessage::DELIVERY_MODE_PERSISTENT));
重启 rabbitmq-server
queue和ready message依然存在
标签: rabbitmq