@@ -44,13 +44,13 @@ public function addRequest($msgBody, $server, $requestId = null, $routingKey = '
44
44
public function getReplies ()
45
45
{
46
46
$ 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 ' ));
48
48
49
49
while (count ($ this ->replies ) < $ this ->requests ) {
50
50
$ this ->getChannel ()->wait (null , false , $ this ->timeout );
51
51
}
52
52
53
- $ this ->getChannel ()->basic_cancel ($ this -> getQueueName () );
53
+ $ this ->getChannel ()->basic_cancel ($ consumer_tag );
54
54
$ this ->requests = 0 ;
55
55
$ this ->timeout = 0 ;
56
56
@@ -70,7 +70,7 @@ public function processMessage(AMQPMessage $msg)
70
70
protected function getQueueName ()
71
71
{
72
72
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 );
74
74
}
75
75
76
76
return $ this ->queueName ;
0 commit comments