0
RabbitMQ에서 비동기 대기열 처리의 좋은 예를 찾는 데 문제가 있습니다.RabbitMQ로 비동기 대기열 처리
//here I declare the connection exchange and queue
$this->connection = new AMQPConnection('localhost', 5672, 'guest', 'guest');
$this->channel = $this->connection->channel();
$this->channel->exchange_declare("exchange", 'direct', false, false, false);
list($this->queue_name, ,) = $this->channel->queue_declare("Queue", false, false, true, false);
while($envelope = $queue->get())
{
// do work here...
}
문제는 내가 while
을 다음에 사용할 수 있도록 내가 큐 이름은 큐 참조 대신 돌려 보내고있어입니다 :
I는 서버 측에서이 같은 것을 구현 시작하려고했습니다 고리.
나는 또한 this link에 쓰여진대로 큐를 만들고 선언하려했지만 내 과 같은 클래스가 없습니다. 내 RabbitMQ
패키지가 배달되었습니다.
누군가가 get 메서드를 사용할 수있는 대기열 인스턴스를 얻는 방법을 알고 있습니까? 또한 https://github.com/videlalvaro/php-amqplib/blob/master/demo/amqp_consumer.php
그리고 : http://www.rabbitmq.com/tutorials/tutorial-one-php.html
https://github.com/videlalvaro/php-amqplib이 예를 살펴 보자 :