RabbitMQ-Management-API-Client icon indicating copy to clipboard operation
RabbitMQ-Management-API-Client copied to clipboard

Exceptions when using with RabbitMQ 3.3

Open meinharrd opened this issue 11 years ago • 1 comments

Issue

  • When calling APIClient::listQueues() on a RabbitMQ 3.3 server I get exceptions like this:
Entity RabbitMQ\Management\Entity\Queue does not have property consumer_utilisation
Entity RabbitMQ\Management\Entity\Queue does not have property state

Solution

Adding this at the top of Queue.php serves as a quick fix:

    public $consumer_utilisation;
    public $state;

Clues

  • There are probably other new/changed properties between 3.1 and 3.3, so a careful comparison needs to take place

meinharrd avatar Jun 02 '14 12:06 meinharrd

Patch:

--- Queue.php   2014-06-02 12:45:56.000000000 +0000
+++ Queue.new.php   2014-06-02 12:53:38.000000000 +0000
@@ -21,6 +21,8 @@
     public $slave_nodes;
     public $consumers;
     public $consumer_details = array();
+    public $consumer_utilisation;
+    public $state;
     public $messages;
     public $messages_ready;
     public $message_stats;

Apply via:

patch --forward Queue.php < Queue.patch

meinharrd avatar Jun 02 '14 13:06 meinharrd