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

report error inqueue_declare #692

Closed
BlackDogLi opened this issue May 21, 2019 · 2 comments
Closed

report error inqueue_declare #692

BlackDogLi opened this issue May 21, 2019 · 2 comments

Comments

@BlackDogLi
Copy link

My code:

$con = new AMQPStreamConnection('127.0.0.1', 5672, 'guest', 'guest');
        $channel = $con->channel();
        $channel->queue_declare('study_notice', false, true, false, false, ['x-queue-mode' => 'lazy']);
        $callback = function ($msg) {
            echo $msg->body;
        };
        $channel->basic_consume('study_notice', '', false, true, false, false, $callback);

        while(count($channel->callbacks)) {
            $channel->wait();
        }
        $channel->close();
        $con->close();

error:
image

@ramunasd
Copy link
Member

@BlackDogLi usually You cannot change queue options, they always must be same. Unless queue was deleted before declaring using different options.
Closing because this is not library problem.

@BlackDogLi
Copy link
Author

I try delete the queue, and run my code.There is no x-queue-mode in the queue info after create the queue.
I try print the $arguments on the function queue_declare,it echo [].I do not find the problem!

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