PHPackages                             easyrabbit/easyrabbit - 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. easyrabbit/easyrabbit

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

easyrabbit/easyrabbit
=====================

This package makes it easy to use RabbitMQ

1.1(1y ago)03MITPHPPHP ^8.1

Since Oct 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ecnivoke/laravel-rabbitmq)[ Packagist](https://packagist.org/packages/easyrabbit/easyrabbit)[ RSS](/packages/easyrabbit-easyrabbit/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

This package is not maintained for the public
=============================================

[](#this-package-is-not-maintained-for-the-public)

Example uses
------------

[](#example-uses)

Create a service that listens for any incoming requests on the *user-service* queue.

```
use EasyRabbit\RabbitRouter;
use EasyRabbit\Connection\RabbitMQ;
use EasyRabbit\Connection\RabbitConfig;
use EasyRabbit\Message\RabbitRequest;

$connection = new RabbitMQ(new RabbitConfig('172.17.0.1', 5576, 'guest', 'guest'));

$connection
	->queue('user-service')
	->listen(new RabbitRouter([
		// RabbitRouter takes an array of key-value pairs. The key is the route which will get matched when a
		// message is recieved from EasyRabbit\Connection\RabbitMQ in the format of a EasyRabbit\Message\RabbitRequest.
		// The value of the pair is the method or closure that will get executed. A message will get send back to a given
		// reply queue in case one is provided.
		'register-invoke' => MyRegisterUserHandler::class,
		'register-method' => [MyRegisterUserHandler::class, 'register'],
		'register-closure' => function(RabbitRequest $request): void {

			$user = createUser($request->data);

			sendWelcomeMail($user->email);
		},
	]));

$connection->close();
```

Creates a service that sends data to the *user-service* to create a user.

```
use EasyRabbit\Connection\RabbitMQ;
use EasyRabbit\Connection\RabbitChannel;
use EasyRabbit\Connection\RabbitConfig;
use EasyRabbit\Message\RabbitReply;

$connection = new RabbitMQ(new RabbitConfig('172.17.0.1', 5576, 'guest', 'guest'));

$connection
	->queue('user-service')
	// Append extra data to the message.
	->with([
		'username' 	=> 'Monke',
		'email' 	=> 'test@test.nl',
	])
	// This parameter is the route which will be matched by the EasyRabbit\RabbitRouter when the message is received.
	->send('register-invoke');

$connection->close();
```

Create a service that listenens for any incoming requests on the *product-service* queue.

```
use EasyRabbit\RabbitRouter;
use EasyRabbit\Connection\RabbitMQ;
use EasyRabbit\Connection\RabbitConfig;
use EasyRabbit\Message\RabbitRequest;

$connection = new RabbitMQ(new RabbitConfig('172.17.0.1', 5576, 'guest', 'guest'));

$connection
	->queue('product-service')
	->listen(new RabbitRouter([
		'get-product' => MyGetProductHandler::class,
	]));

$connection->close();
```

Creates a service that asks for a product with a specific uuid and waits for the response.

```
use EasyRabbit\Connection\RabbitMQ;
use EasyRabbit\Connection\RabbitChannel;
use EasyRabbit\Connection\RabbitConfig;
use EasyRabbit\Message\RabbitReply;

$productUuid = '7d4ec64c-60dc-4d26-84bc-d95225322b94';

$connection = new RabbitMQ(new RabbitConfig('172.17.0.1', 5576, 'guest', 'guest'));

$connection
	->queue('product-service')
	// Set a reply callback that starts listening after a message has been sent to the set queue.
	->catchReply(function(RabbitChannel $channel, RabbitReply $reply): void {
		if($reply->code !== 200) {
			echo 'Error occured';
			return ;
		}

		echo "Product recieved: {$reply->data['name']}";
	})
	->with([
		'uuid' => $productUuid,
	])
	// The second parameter is a unique identifier that ensures a unique reply queue will be created.
	// This will guarantee that the reply callback, set previously, with the correct response data.
	// This unique queue will be deleted right after the reply was received.
	->send('get-product-method', $productUuid);

$connection->close();
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

593d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4692fb32d8db6ea465d48216929089a601a625920049c5a309f0df4cefc3038f?d=identicon)[ecnivoke](/maintainers/ecnivoke)

### Embed Badge

![Health badge](/badges/easyrabbit-easyrabbit/health.svg)

```
[![Health](https://phpackages.com/badges/easyrabbit-easyrabbit/health.svg)](https://phpackages.com/packages/easyrabbit-easyrabbit)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[illuminate/http

The Illuminate Http package.

11936.0M5.1k](/packages/illuminate-http)[codeception/module-phpbrowser

Codeception module for testing web application over HTTP

6529.8M508](/packages/codeception-module-phpbrowser)[megaads/apify

A pretty library to help developers build RESTful APIs lightly, quickly and properly even without writing code

151.7k](/packages/megaads-apify)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
