RabbitMQ 从入门到放弃系列笔记(三):PHP 中实现消息发送和接收

send.php <?php /** * 发送消息 */ $exchangeName = ‘demo’; $routeKey = ‘hello’; $message = ‘Hello World!’; // 建立TCP连接 $connection = new AMQPConnection([ ‘host’ => ‘localhost’, ‘port’ => ‘5672’…