Download the PHP package asmblah/php-amqp-compat without Composer
On this page you can find all versions of the php package asmblah/php-amqp-compat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-amqp-compat
PHP AMQP-Compat.
php-amqp/ext-amqp compatibility using php-amqplib.
Why?
php-amqp
/librabbitmq
does not fully support AMQP heartbeats,
they are only supported during blocking calls into the extension.
Heartbeat sender
With php-amqplib
, we're able to send heartbeats more regularly, in multiple ways:
- Using a ReactPHP EventLoop with Envoylope EventLoop (recommended).
- Using UNIX System V signals with Envoylope ext-pcntl.
See the usage instructions for the packages above for installation.
Usage
First, remove ext-amqp
- it cannot be used at the same time as this compatibility layer.
Usually, this will be with PECL:
This is because the classes installed in the global/root namespace such as
AMQPConnection
would conflict.
Second, install this package with Composer:
Lastly, install the relevant heartbeat sender, if required.
That should be all the changes required - this userland library is designed as a drop-in replacement.
Limitations
- Persistent connections are not and cannot be supported from userland.
- If existing logic is checking for the
amqp
extension viaextension_loaded('amqp')
, it will fail because this library does not define an extension. During functional testing,extension_loaded(...)
is hooked using PHP Code Shift to allow running tests from the reference implementation php-amqp/ext-amqp, see ReferenceImplementationTest.
See also
- The original php-amqp extension that this compatibility layer replaces: php-amqp/ext-amqp.
php-amqplib
, which this library uses under the hood: php-amqplib.
All versions of php-amqp-compat with dependencies
ext-sockets Version *
nytris/nytris Version ^0.1
php-amqplib/php-amqplib Version v3.5.4
psr/log Version ^1|^2|^3