@@ -44,13 +44,13 @@ public function addRequest($msgBody, $server, $requestId = null, $routingKey = '
4444 public function getReplies ()
4545 {
4646 $ this ->replies = array ();
47- $ this ->getChannel ()->basic_consume ($ this ->getQueueName (), '' , false , true , false , false , array ($ this , 'processMessage ' ));
47+ $ consumer_tag = $ this ->getChannel ()->basic_consume ($ this ->getQueueName (), '' , false , true , false , false , array ($ this , 'processMessage ' ));
4848
4949 while (count ($ this ->replies ) < $ this ->requests ) {
5050 $ this ->getChannel ()->wait (null , false , $ this ->timeout );
5151 }
5252
53- $ this ->getChannel ()->basic_cancel ($ this -> getQueueName () );
53+ $ this ->getChannel ()->basic_cancel ($ consumer_tag );
5454 $ this ->requests = 0 ;
5555 $ this ->timeout = 0 ;
5656
@@ -70,7 +70,7 @@ public function processMessage(AMQPMessage $msg)
7070 protected function getQueueName ()
7171 {
7272 if (null === $ this ->queueName ) {
73- list ($ this ->queueName , ,) = $ this ->getChannel ()->queue_declare ("" , false , false , true , true );
73+ list ($ this ->queueName , ,) = $ this ->getChannel ()->queue_declare ("" , false , false , true , false );
7474 }
7575
7676 return $ this ->queueName ;
0 commit comments