Discussion:
[rabbitmq-discuss] Exchange to Exchange Binding Apache/PHP AMQP- PECL 1.0.9/1.0.7
Eric Berg
2012-12-20 17:02:44 UTC
Permalink
Hi,
I am setting up a Rabbit connection in my php application code and binding
one exchange to another for a rich topology. However the $exchange->bind()
call blocks and my server hangs. The exchanges are created correctly and
the binding is successful, but the call never returns. Has anyone run into
this before? Thanks for the help

Side notes:
If I pass in the AMQP_NOWAIT flag to the bind method doesnt block, but the
binding does not succeed.
This works correctly through the CLI, but not in apache

Are there any known modules/issues with apache that might cause this?

Versions:
Rabbit 3.0.0
AMQP- PECL 1.0.9 and 1.0.7 (tried both)
PHP 5.3.13
Apache 2.2.3
**

My code"

$connection = new AMQPConnection();
$connection->connect();
if (!$connection->isConnected()) {
die('Not connected :(' . PHP_EOL);
}
// Open Channel
$channel = new AMQPChannel($connection);
// Declare exchange

$exchange1 = new AMQPExchange($channel);
$exchange1->setName('master');
$exchange1->setType('topic');
$exchange1->declare();

$exchange = new AMQPExchange($channel);
$exchange->setName('exchange1');
$exchange->setType('topic');
$exchange->declare();


$exchange->bind('master', 'routing_key');
// Never gets here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20121220/77f2bdb6/attachment.htm>
Matthias Radestock
2012-12-21 16:30:23 UTC
Permalink
Eric,
Post by Eric Berg
I am setting up a Rabbit connection in my php application code and
binding one exchange to another for a rich topology. However the
$exchange->bind() call blocks and my server hangs. The exchanges are
created correctly and the binding is successful, but the call never
returns. Has anyone run into this before? Thanks for the help
If I pass in the AMQP_NOWAIT flag to the bind method doesnt block, but
the binding does not succeed.
That is odd - the NOWAIT flag has no effect on what the broker does; it
simply causes the response to be omitted.
Post by Eric Berg
This works correctly through the CLI, but not in apache
...and from your previous emails I gather it worked fine in apache with
rabbitmq 2.8.7.

I suggest you run the working and non-working versions through the
RabbitMQ AMQP protocol tracer
(http://www.rabbitmq.com/api-guide.html#tracer) and capture & compare
the output.

Regards,

Matthias.

Loading...