Home

Awesome

PHP AMQP bindings Test

Object-oriented PHP bindings for the AMQP C library (https://github.com/alanxz/rabbitmq-c)

Requirements:

Installation

Linux

Some systems have php-amqp extension available in their package repositories or available via an external repository so it is MAY be the preferable way to install.

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).

Windows

Documentation

Check out the official RabbitMQ tutorials as well as the php-amqp specific examples.

There are also stub files available that document the API of PHP AMQP. These stubs can also be used in your IDE for code completion, navigation and documentation.

Check out the upgrading guide to check breaking changes between versions, e.g. from 1.x to 2.x.

Finally, check out the tests to see usage examples and edge cases.

Notes & limitations

Related libraries

How to report a problem

  1. First, search through the closed issues and stackoverflow.com.
  2. Submit an issue with short and definitive title that describe your problem
  3. Provide platform info, PHP interpreter version, SAPI mode (cli, fpm, cgi, etc) the extension is used in, php-amqp extension version, librabbitmq version, make tools version.
  4. Description should provide information on how to reproduce a problem (gist is the most preferable way to include large sources) in a definitive way. Use Vagrant to replicate unusual environments.
  5. If stack trace is generated, include it in full via gist or the important part (if you definitely know what you are doing) directly in the description.

Things to check before reporting a problem

Some of them, the list is not complete.

  1. You are running on correct machine in correct environment and your platform meets your application requirement.
  2. librabbitmq is installed and discoverable in your environment so php-amqp extension can load it.
  3. php-amqp extension present in system (find amqp.so or amqp.dll if you are on windows), it is loaded (php --ri amqp produced some info), and there are no underlying abstraction that MAY emulate php-amqp work.
  4. You hav correct RabbitMQ credentials.
  5. You are using the latest php-amqp, librabbitmq, RabbitMQ and sometimes PHP version itself. Sometimes your problem is already solved.
  6. Other extensions disabled (especially useful when PHP interpreter crashes, and you get a stack trace and segmentation fault).

Development

See DEVELOPMENT.md for details.