php.net |  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
Votes:1
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:
Package:
Bug Type:
Summary:
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
Description:
------------
RabbitMQ ignores the RoutingKey altogether when binding the queue to an exchange 
of type FANOUT

http://www.rabbitmq.com/tutorials/amqp-concepts.html#exchange-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: http://www.php.net/amqpqueue.bind
---


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

// Create a new queue
$q = new AMQPQueue($ch);
$q->declare('queue1');

// Bind it on the exchange to routing.key
$ex->bind('queue1');

Expected result:
----------------
Queue is bound to exchange.

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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 
here: https://github.com/pdezwart/php-amqp/pull/32

This will be in the next released version.
 [2012-12-21 01:05 UTC] lstrojny@php.net
-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