|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-09-08 02:02 UTC] pdezwart at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 18:00:02 2025 UTC |
Description: ------------ There should be a way to get the queue name from an AMQPQueue object after a declare. This is because, if declare is called with an empty string for queue name, then the server creates an auto-generated queue name. This is very useful for RPC in amqp. But, currently, there is no way to get the queue name from a queue object, only set it. Reproduce code: --------------- $conn = new \AMQPConnection(); $conn->connect(); $ex = new \AMQPExchange($conn); $ex->declare('rpc_reply_queues', AMQP_EX_TYPE_DIRECT, AMQP_DURABLE); $q = new \AMQPQueue($conn); $q->declare('', AMQP_AUTODELETE | AMQP_EXCLUSIVE); $queueName = ""; // this is where we need to be able to get the queue name $ex->bind($queueName, $queueName); // while we are sleeping, go run list_queues on your management console in your amqp server, you will see at least one amq.gen- (or something similar) queue(s) sleep(60); exit; Expected result: ---------------- I expect it to generate an auto-named queue on the server, which it does. I would then like a way to get the name of that queue from the $q object so I can set the $queueName variable. Actual result: -------------- There is no way to get the queue name from the $q object.