|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #63346 AMQPQueue::bind() second parameter should be optional.
Submitted: 2012-10-24 11:18 UTC Modified: 2012-12-21 01:05 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: andre dot torgal at gmail dot com Assigned: lstrojny (profile)
Status: Closed Package: amqp (PECL)
PHP Version: Irrelevant OS: irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: andre dot torgal at gmail dot com
New email:
PHP Version: OS:


 [2012-10-24 11:18 UTC] andre dot torgal at gmail dot com
RabbitMQ ignores the RoutingKey altogether when binding the queue to an exchange 
of type FANOUT

It would be great to have the $routingKey parameter made optional instead of 
having to type "foobar" or "ignored".

The broker, being used (RabbitMQ, other) should then handle pre-conditions to 
make the bind() effective.

From manual page:

Test script:
$ex = new AMQPExchange($ch);
$ex->declare('exchange1', AMQP_EX_TYPE_FANOUT);

// Create a new queue
$q = new AMQPQueue($ch);

// Bind it on the exchange to routing.key

Expected result:
Queue is bound to exchange.

Actual result:
Uncaught exception 'AMQPExchangeException' with message 'Could not bind exchange. 
No routing key given.'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-12-04 17:01 UTC] bkw at codingforce dot com
Thanks for reporting this, this has been fixed in the development version, see 

This will be in the next released version.
 [2012-12-21 01:05 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: lstrojny
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Sep 23 01:03:33 2021 UTC