Skip to content

Unable to query a quorum queue #149

@slloyd88

Description

@slloyd88

I have confirmed that the queue is defaulted to quorum on the RMQ server.

<?php
namespace Bunny;
require_once 'c:/wasql/vendor/autoload.php';


$connection = [
    'host'      => '***************',
    'vhost'     => '************',   
    'user'      => '************', 
    'password'  => '************',
    'port'		=> 5673
];



$bunny = new Client($connection);
$bunny->connect();
echo "CONNECTED".PHP_EOL;
$channel = $bunny->channel();
$channel->queueDeclare('rmqodhjspdq', false, true); // Queue name
echo "CHANNEL DECLARED".PHP_EOL;
$message = $channel->get('rmqodhjspdq');
$channel->ack($message); // Acknowledge message
echo "rmqdstjspdq:".$message;
exit;
CONNECTED
PHP Fatal error:  Uncaught Bunny\Exception\ClientException: PRECONDITION_FAILED - inequivalent arg 'x-queue-type' for queue 'rmqodhjspdq' in vhost 'dot.dataw.preview': received none but current is the value 'quorum' of type 'longstr' in C:\wasql\vendor\bunny\bunny\src\Bunny\ClientMethods.php:1280
Stack trace:
#0 C:\wasql\vendor\bunny\bunny\src\Bunny\ClientMethods.php(1240): Bunny\AbstractClient->awaitQueueDeclareOk()
#1 C:\wasql\vendor\bunny\bunny\src\Bunny\ChannelMethods.php(111): Bunny\AbstractClient->queueDeclare()
#2 C:\wasql\bunnytest.php(20): Bunny\Channel->queueDeclare()
#3 {main}
  thrown in C:\wasql\vendor\bunny\bunny\src\Bunny\ClientMethods.php on line 1280
PHP Fatal error:  Uncaught Bunny\Exception\ClientException: Connection closed by server: CHANNEL_ERROR - expected 'channel.open' in C:\wasql\vendor\bunny\bunny\src\Bunny\AbstractClient.php:445
Stack trace:
#0 C:\wasql\vendor\bunny\bunny\src\Bunny\Client.php(254): Bunny\AbstractClient->onFrameReceived()
#1 C:\wasql\vendor\bunny\bunny\src\Bunny\Client.php(63): Bunny\Client->run()
#2 [internal function]: Bunny\Client->__destruct()
#3 {main}
  thrown in C:\wasql\vendor\bunny\bunny\src\Bunny\AbstractClient.php on line 445

Activity

WyriHaximus

WyriHaximus commented on May 19, 2024

@WyriHaximus
Collaborator

Hey, sorry for the delayed response, thought I already replied to you. Been running with quorum queues for years now. I'll have a quick on why this is happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @WyriHaximus@slloyd88

        Issue actions

          Unable to query a quorum queue · Issue #149 · jakubkulhan/bunny