php-amqp | PHP extension to communicate with any AMQP compliant server | Pub Sub library

 by   php-amqp C Version: Current License: Non-SPDX

kandi X-RAY | php-amqp Summary

kandi X-RAY | php-amqp Summary

php-amqp is a C library typically used in Messaging, Pub Sub, RabbitMQ applications. php-amqp has no bugs, it has no vulnerabilities and it has low support. However php-amqp has a Non-SPDX License. You can download it from GitHub.

Object-oriented PHP bindings for the AMQP C library (
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              php-amqp has a low active ecosystem.
              It has 485 star(s) with 106 fork(s). There are 37 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 42 open issues and 191 have been closed. On average issues are closed in 106 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of php-amqp is current.

            kandi-Quality Quality

              php-amqp has 0 bugs and 0 code smells.

            kandi-Security Security

              php-amqp has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              php-amqp code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              php-amqp has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              php-amqp releases are not available. You will need to build from source code and install.
              Installation instructions are available. Examples and code snippets are not available.
              It has 1772 lines of code, 169 functions and 22 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of php-amqp
            Get all kandi verified functions for this library.

            php-amqp Key Features

            No Key Features are available at this moment for php-amqp.

            php-amqp Examples and Code Snippets

            No Code Snippets are available at this moment for php-amqp.

            Community Discussions

            QUESTION

            Azure Servicebus connection PHP
            Asked 2022-Mar-12 at 09:39

            I would like to connect with Azure Servicebus via PHP. The docs however from Microsoft itself are outdated and the libs mentioned and maintained by Microsoft are mostly abandoned.

            If i am correct the Azure Servicebus follows the AMQP protocol? I am trying to connect via AMQP itself to the servicebus but no succes at all.

            When i try to create a new connection with below an error is returned:

            ...

            ANSWER

            Answered 2022-Mar-12 at 09:39

            I am answering this question on my own since i came to the conclusion that there is actually not a valid answer available. The SDK from Microsoft has been abandoned and there is no actual PHP solution for this at this moment of writing.

            For me this means we will not consume the service but start using RabbitMQ instead.

            Source https://stackoverflow.com/questions/71000374

            QUESTION

            In Centos 7, how do you permanently consume messages with rabbitmq?
            Asked 2022-Jan-27 at 12:09

            Good day,

            I have just uploaded Symfony 3.4 project (PHP 7.2) to Centos server and my application needs to be connected to RabbitMQ. I want to do that in Centos server rabbitmq is constantly consuming messages. I know how to consume those messages temporarily by running this command: bin/console rabbitmq:consumer messaging . But how could permanently I consume the messages on server? I tried to google but didn't find any useful information

            In my application I've installed:

            "php-amqplib/php-amqplib": "*",

            "php-amqplib/rabbitmq-bundle": "*"

            UPDATE:

            I achieved my desired situation with the following command:

            nohup bin/console rabbitmq:consumer &

            ...

            ANSWER

            Answered 2022-Jan-26 at 15:36

            idk if there's an "official" way of doing it, but as with anything in Linux, you could just write a little daemon to do it, a minimum example would be to add this to your crontab -e

            Source https://stackoverflow.com/questions/70865799

            QUESTION

            Symfony RabbitMQ Bundle in AWS (managed service): Any way to get this working?
            Asked 2021-Jun-09 at 09:33

            We really tried a lot but it still can not get the Symfony RabbitMQ bundle (https://github.com/php-amqplib/RabbitMqBundle) running in AWS (with Docker). AWS only allows AMQPS and port 5671 to be opened in the AWS managed service.

            This is our current configuration in detail:

            ...

            ANSWER

            Answered 2021-Jun-09 at 09:33

            Finally solved - you have to define a custom AMQPChannel with a custom AMQPConnection with SSL options and then set this AMQPChannel to the producer:

            Source https://stackoverflow.com/questions/67890842

            QUESTION

            How to close rabbitmq connections from consumer callback using php-amqplib
            Asked 2021-May-21 at 15:14

            I have been able to set up a script that connects to RabbitMQ using the php-amqplib library. However, I want to be able to exit the script, if necessary.

            We thought that creating a stop.txt file would solve the problem. Basically, once a message is received, if the script sees that file, it must stop any further messages from being received, delete the file and exit the script.

            However, although it is deleting the file, it does not prevent further messages from being received, neither does it exit the script.

            As you can see I am using exactly the same function to exit the script as this official example uses: https://github.com/php-amqplib/php-amqplib/blob/master/demo/amqp_consumer.php. See line 54.

            Am I doing something wrong or not understanding something? I am a novice to this library.

            Here is the script I am working with. I have left parts out for brevity.

            ...

            ANSWER

            Answered 2021-May-21 at 15:13

            This seems to close everything off. I do not know whether it is the best solution. I basically close the channel and connection from within the callback.

            Source https://stackoverflow.com/questions/67623431

            QUESTION

            Composer 2.0.8 issue package-versions-deprecated
            Asked 2020-Dec-17 at 14:30

            Using php 7.2

            ...

            ANSWER

            Answered 2020-Dec-17 at 14:30

            This seems to be a problem with the virtual box filesystem. I created an issue to composer and hopefully more insight will be gained.

            https://github.com/composer/package-versions-deprecated/issues/21

            Source https://stackoverflow.com/questions/65149298

            QUESTION

            Class Sensio\Bundle\DistributionBundle\Composer\ScriptHandler is not autoloadable, can not call symfony-scripts script
            Asked 2020-Sep-29 at 19:06

            We have the below contents on composer.json with dependencies and scripts. This comes from a legacy project where the vendors directory was pushed to GitHub. We're trying to remove that vendors directory from the repository to make its creation a part of the build process.

            ...

            ANSWER

            Answered 2020-Sep-29 at 19:06

            I copied your composer.json to my local environment and ran composer update and had the same results. The problem is, that the class Sensio\Bundle\DistributionBundle\Composer\ScriptHandler does not exist with your config. So I executed composer require sensio/distribution-bundle, but then I got a version conflict:

            Source https://stackoverflow.com/questions/64125221

            QUESTION

            Laravel installation and create-project issue
            Asked 2020-Sep-15 at 16:55

            I was facing an issue to install laravel in my ubuntu. Please help me.

            ...

            ANSWER

            Answered 2020-Sep-15 at 16:55

            I used this and It works for me.

            Source https://stackoverflow.com/questions/63856646

            QUESTION

            ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN
            Asked 2020-Jul-14 at 13:33

            We got an error form laravel 7, when rabbitMQ Connection in server. The same server Laravel 5.8 working fine, We use same login details for both 5.8 and 7. But 7 version only we that issue

            ACCESS_REFUSED - Login was refused using the authentication mechanism AMQPLAIN. For details see the broker logfile.(0, 0) vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php:745

            ...

            ANSWER

            Answered 2020-Jul-14 at 13:33

            I Found the solution, This is an issue from .env file. Change name of login details from RABBITMQ_LOGIN to RABBITMQ_USER. it working fine.

            Source https://stackoverflow.com/questions/62888633

            QUESTION

            Problem connection from PHP to Apache ActiveMQ using AMQP
            Asked 2020-Jul-04 at 01:46

            I tried searching the web up and down - and either they point me towards RabbitMQ which is out of the question because the customer specifically asked for ActiveMQ / Amazon MQ which is basically ActiveMQ in the amazon cloud. Other results suggest using a different protocol (STOMP) - which I cant do because again the customer allows only the access via AMQP

            So I'm at a loss .. can you help me get going ? I tried with PHPamqplib but I get errors accessing the already running activeMQ broker "Invalid frame type 65 in ....AbstractConnection.php:571" during connection build up.

            ...

            ANSWER

            Answered 2020-Jul-04 at 01:46

            According to the README.md php-amqplib supports AMQP 0.9.1. However, ActiveMQ supports AMQP 1.0. Unfortunately the two protocols are not compatible. You'll need to find a PHP AMQP client which supports 1.0 if you want to communicate with ActiveMQ or Amazon MQ. According to this thread there are no plans to support AMQP 1.0 in php-amqplib.

            The amqpnetlite client supports AMQP 1.0 which is why it works with ActiveMQ.

            Source https://stackoverflow.com/questions/62717182

            QUESTION

            How to configure a PHP extension for multiple PHP versions?
            Asked 2020-May-05 at 06:45

            Using ondrej repository on Ubuntu Focal, I have installed PHP from 5.6 to 7.4.

            When I install an extension, for example php-amqp in my case with apt install php-amqp, the extension is only configured for the default PHP version 7.4.

            When looking for amqp.so in my system, it's only available in the PHP 7.4 extension folder /usr/lib/php/20190902.

            How can I make it available in all my PHP version (and same for others extension like php-geoip for example)?

            ...

            ANSWER

            Answered 2020-May-05 at 06:45

            I'm so dumb. When I upgraded to Ubuntu Focal, ondrej's repository was not ready for it, stuck with Eoan.

            Now, I have update the repository because Focal is available and after a apt update && apt upgrade, all my PHP extensions have been reconfigured and are available in all my PHP versions.

            Source https://stackoverflow.com/questions/61596247

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install php-amqp

            Some systems has php-amqp extension in their repo or available via external repositories, so it is MAY be the preferable way to install. RPM packages are available in Fedora and EPEL (for RHEL and CentOS) official repositories, see php-pecl-amqp. Fresh php-pecl-amqp and librabbitmq RPMs available via remi repo. If you want to stay on the bleeding edge and have the latest version, install php-amqp extension from PECL or compile from sources (follow PHP official docs instruction).
            Before download, check if your PHP installation is thread safe or non-thread safe by entering php -i|findstr "Thread" in your terminal
            Download thread safe or non-thread safe version of the extension for your PHP version from https://pecl.php.net/package/amqp. Look for the "DLL" link next to each release in the list of available releases
            After download, copy the rabbitmq.4.dll and rabbitmq.4.pdb files to the PHP root folder and copy php_amqp.dll and php_amqp.pdb files to PHP\ext folder
            Add extension=amqp to the php.ini file
            Check if the module is properly installed with php -m

            Support

            View RabbitMQ official tutorials and php-amqp specific examples. There are also available stub files with accurate PHPDoc which may be also used in your IDE for code completion, navigation and documentation in-place. Finally, check out the tests to see typical usage and edge cases.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/php-amqp/php-amqp.git

          • CLI

            gh repo clone php-amqp/php-amqp

          • sshUrl

            git@github.com:php-amqp/php-amqp.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link