note 105031 added to amqpqueue.consume
| From: | Anonymous at osu1 dot php dot net | Date: | Sat, 23 Jul 2011 06:31:27 +0000 |
| Subject: | note 105031 added to amqpqueue.consume | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-181801@lists.php.net to get a copy of this message | ||
this is how i send messages
19 for($i = 0; $i < 10; ++$i){
20 // $ex->publish("hello, world!", $routingKey);
21
22 $ex->publish(str_repeat(''.$i, 20), $routingKey);
23 }
the consumer use consume to get messages
17 $options = array(
18 'min' => 1,
19 'max' => 10,
20 'ack' => true
21 );
22 while(1){
23 echo "waiting for messages...\n";
24 $ms = $queue->consume($options);
25 foreach($ms as $m){
26 $body = $m['message_body'];
27 echo "recv $body \n";
28 //sleep($body);
29 }
30 }
but the output is :
waiting for messages...
recv 00000000000000000000
waiting for messages...
recv 99999999999999999999
recv 99999999999999999999
recv 99999999999999999999
recv 99999999999999999999
recv 99999999999999999999
recv 99999999999999999999
recv 99999999999999999999
recv 99999999999999999999
recv 99999999999999999999
waiting for messages...
can anybody tell me why ?
i use the tcpdump to find out that the data tansfered from both direction(send and recv) is right,
it is the bug for this consume function ?
----
Server IP: 69.147.83.197
Probable Submitter: 124.42.143.186
----
Manual Page -- http://www.php.net/manual/en/amqpqueue.consume.php
Edit -- https://master.php.net/note/edit/105031
Del: integrated -- https://master.php.net/note/delete/105031/integrated
Del: useless -- https://master.php.net/note/delete/105031/useless
Del: bad code -- https://master.php.net/note/delete/105031/bad+code
Del: spam -- https://master.php.net/note/delete/105031/spam
Del: non-english -- https://master.php.net/note/delete/105031/non-english
Del: in docs -- https://master.php.net/note/delete/105031/in+docs
Del: other reasons-- https://master.php.net/note/delete/105031
Reject -- https://master.php.net/note/reject/105031
Search -- https://master.php.net/manage/user-notes.php