PHPackages                             jcook/react-amqp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. jcook/react-amqp

AbandonedArchivedLibrary[HTTP &amp; Networking](/categories/http)

jcook/react-amqp
================

AMQP bindings for ReactPHP

271.2k3PHP

Since Mar 23Pushed 10y agoCompare

[ Source](https://github.com/JCook21/ReactAMQP)[ Packagist](https://packagist.org/packages/jcook/react-amqp)[ RSS](/packages/jcook-react-amqp/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

**This library is no longer maintained and should be considered deprecated.**

ReactAMQP
=========

[](#reactamqp)

Basic AMQP bindings for [React PHP](https://github.com/reactphp).

Install
-------

[](#install)

This library requires PHP 5.4 and the [PECL AMQP extension](http://pecl.php.net/package/amqp). The best way to install this library is [through composer](http://getcomposer.org).

```
{
	"require": {
		"jcook/react-amqp": "dev-master"
	}
}
```

Usage
-----

[](#usage)

This library provides two classes, an AMQP Consumer and Producer. Both classes work with a periodic timer and you supply the timer interval as an argument to the constructor.

### Consumer

[](#consumer)

The consumer class allows you to receive messages from an AMQP broker and to dispatch a callback whenever one is received. You can also supply a number of messages to consume in one go, making sure that your event loop isn't perpetually stuck consuming messages from a broker. The callback you supply must accept an AMQPEnvelope as the first argument and an optional AMQPQueue as the second.

```
