示例#1
0
 public function __construct(AMQPConnection $conn, $queueName)
 {
     parent::__construct($conn->channel());
     $this->queueName = $queueName;
     $this->channel->queue_declare($this->queueName, false, true, false, false);
 }
示例#2
0
 public function __construct(AMQPConnection $conn)
 {
     parent::__construct($conn->channel());
     $this->exchangeName = 'TestTopic_' . uniqid();
     $this->channel->exchange_declare($this->exchangeName, 'topic', false, true, false);
 }