note 105031 deleted from amqpqueue.consume by danbrown

From: Date: Mon, 25 Jul 2011 12:28:06 +0000
Subject: note 105031 deleted from amqpqueue.consume by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-181833@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- 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 ?

« previous php.notes (#181833) next »