[rabbitmq-discuss] PHP amqp 0.9.1 breaks after rabbitmq server upgrade to 3.1
elad
elad at centunosolutions.com
Wed May 8 02:57:47 BST 2013
hey guys, here is the code I use:
$conn_args = array('host' => '127.0.0.1', 'port' => '5672', 'login'
=> 'Administrator', 'password' => 'admin');
$cnn = new AMQPConnection($conn_args);
$cnn->connect();
$ch = new AMQPChannel($cnn);
$ch->setPrefetchCount(1);
$q = new AMQPQueue($ch);
$q->setName('app_event');
$q->setFlags(AMQP_DURABLE);
$q->declare();
while($message = $q->get()) {
echo("Message #".$message->getDeliveryTag()."
'".$message->getBody()."'");
}
It get stuck and I get an exception that the connection closed unexpectedly.
if I set $ch->setPrefetchCount(1) to 0, then everything works.
The funny thing is that with rabbitmq 3.0 (previous version) all worked
perfect and I didnt change the amqp lib.
any ideas ?
--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/PHP-amqp-0-9-1-breaks-after-rabbitmq-server-upgrade-to-3-1-tp26461p26499.html
Sent from the RabbitMQ mailing list archive at Nabble.com.
More information about the rabbitmq-discuss
mailing list