|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-12-04 16:58 UTC] bkw at codingforce dot com
[2021-06-10 15:35 UTC] cmb@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: cmb
[2021-06-10 15:35 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 09:00:01 2025 UTC |
Description: ------------ Current definitions not allow to create bindings with custom arguments (like x- ha-policy): 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 $arguments) 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)); $connection->connect(); $channel = new AMQPChannel($connection); $queue = new AMQPQueue($channel); $queue->setName('testQueue'); $queue->setArguments(array('x-ha-policy'=>'all')); $queue->declare(); $exchange = new AMQPExchange($channel); $queue->setName('testExchange'); $queue->setArguments(array('x-ha-policy'=>'all')); $queue->declare(); $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'