vsda2008 2012-10-11 17:45:16 19615次浏览 8条评论 10 0 0

消息队列 RabbitMQ 的封装
demo:

Yii::import('application.components.AmqpLib.Connection.AMQPConnection');
define('HOST', 'localhost');
define('PORT', 5672);
define('USER', 'guest');
define('PASS', 'guest');
define('VHOST', '/');
//If this is enabled you can see AMQP output on the CLI
define('AMQP_DEBUG', false);
$conn = new AMQPConnection(HOST, PORT, USER, PASS, VHOST);
$ch = $conn->channel();
您需要登录后才可以评论。登录 | 立即注册