Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to query a quorum queue #149

Open
slloyd88 opened this issue May 1, 2024 · 1 comment
Open

Unable to query a quorum queue #149

slloyd88 opened this issue May 1, 2024 · 1 comment

Comments

@slloyd88
Copy link

slloyd88 commented May 1, 2024

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
@WyriHaximus
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants