|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #63672 Allow create bindings with custom Arguments
Submitted: 2012-12-03 03:29 UTC Modified: -
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: work at aotd dot ru Assigned:
Status: Open Package: amqp (PECL)
PHP Version: 5.4.9 OS: Ubuntu 12.04
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-12-03 03:29 UTC] work at aotd dot ru
Current definitions not allow to create bindings with custom arguments (like x-
public bool AMQPQueue::bind ( string $exchange_name , string $routing_key )
public bool AMQPExchange::bind ( string $source_exchange_name , string 
$routing_key , [long $flags])

Maybe modify it into:
public bool AMQPQueue::bind ( string $exchange_name , string $routing_key , array 
public bool AMQPExchange::bind ( string $source_exchange_name , string 
$routing_key , [long $flags, [array $arguments]])
Or inherit Arguments for binding from parent object (queue/exchange)?

Test script:
$connection = new AMQPConnection(array(	'host'  => 'localhost',	'port'  => 5672,	'vhost' => 'test,	'login' => 'guest',	'password' => 'guest));
$channel = new AMQPChannel($connection);
$queue = new AMQPQueue($channel);
$exchange = new AMQPExchange($channel);
$queue->bind('testExchange', 'testRoute', array('x-ha-policy'=>'all'));

Expected result:
We can't get bindings via AMQP library, so look in AMQP Broker and see new 
binding for exchange 'testExchange' and queue 'testQueue' with route 'testRoute' 
marked as 'x-ha-policy'='all'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-12-04 16:58 UTC] bkw at codingforce dot com
Can you supply a link to documentation about bindings also carrying x-ha-policy 
attributes? I was under the assumption exchanges and bindings are central on 
rabbitmq anyways and that it was enough to set these on the queues only, no?
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Oct 28 06:01:23 2020 UTC