public function __construct($config, $queueName = NULL, $exchangeName = NULL) {
self::$queueName = $queueName;
self::$exchangeName = $exchangeName;
// 创建amqpconnection实例
$connect = new AMQPConnection($config);
if (! $connect->connect()) {
die("Cannot connect to the broker!\n");
}
$channel = new AMQPChannel($connect);