Skip to content

Call to undefined method AMQPChannel::is_open() #343

Closed

Description

@vol4ikman

Code:
$connection = new PhpAmqpLib\Connection\AMQPSSLConnection( $host, $port, $user, $password, $vhost = '/', $ssl_opts); $channel = $connection->channel(); $channel->queue_declare('reply-queue', false, true, false, false); echo " [*] Waiting for messages..."; $callback = function ($reply_msg) { echo ' [x] Received ', $reply_msg->body, "\n"; }; $channel->basic_consume('reply-queue', '', false, true, false, false, $callback); while ($channel->is_open()) { $channel->wait(); } $channel->close(); $connection->close();

Error:

Fatal error: Uncaught Error: Call to undefined method PhpAmqpLib\Channel\AMQPChannel::is_open()

Activity

  1. vol4ikman commented on Nov 29, 2022

    @vol4ikman
    Author

    Accodring to this tutorial:

    https://github.com/rabbitmq/rabbitmq-tutorials/blob/main/php/receive.php

    What am I doing wrong?

  2. locked and limited conversation to collaborators on Nov 29, 2022
  3. converted this issue into a discussion #344 on Nov 29, 2022
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions