PHPackages                             vu/amqp-carapace - 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. vu/amqp-carapace

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

vu/amqp-carapace
================

PHP Wrapper for AMQP

0.1.0(11y ago)05.4k11BSD-3-ClausePHPPHP &gt;=5.4

Since Jul 30Pushed 11y ago19 watchersCompare

[ Source](https://github.com/vuhl/AMQPCarapace)[ Packagist](https://packagist.org/packages/vu/amqp-carapace)[ RSS](/packages/vu-amqp-carapace/feed)WikiDiscussions master Synced 1mo ago

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

AMQPCarapace
============

[](#amqpcarapace)

[![Build Status](https://camo.githubusercontent.com/54bc9577c6077ae7fe82052642326cf1862488a174d399594579a9d8a5909359/68747470733a2f2f7472617669732d63692e6f72672f7675686c2f414d515043617261706163652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/vuhl/AMQPCarapace)Introduction
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#introduction)

AMQPCarapace is a simple wrapper for [videlalvaro/php-amqplib](https://github.com/videlalvaro/php-amqplib)to make using its features easier and a little cleaner.

Important Notes
---------------

[](#important-notes)

- AMQPCarapace currently only has publish capabilities. Consuming and other abilities may be added in the future.
- Mandatory flag on a message is not currently supported. You should keep this flag as false otherwise an exception will be thrown.

Installation Using Composer
---------------------------

[](#installation-using-composer)

Add "vu/amqp-carapace" to the require section of your composer.json file and run a respective install or update. For more information on Composer, please visit [their website](https://getcomposer.org/).

Basic Usage
-----------

[](#basic-usage)

Creating a Connection
---------------------

[](#creating-a-connection)

Begin by creating a ConnectionSettings object with all of your exchange connection settings

```
$connection_settings = new \Vu\AMQPCarapace\Model\ConnectionSettings();
$connection_settings->host = "0.0.0.0";
$connection_settings->port = 12345;
$connection_settings->user = "john";
$connection_settings->password = "smith";

$amqp_connection = new \Vu\AMQPCarapace\Connection\Connection();
$amqp_connection->connect($connection_settings);
```

Creating or Opening a Channel
-----------------------------

[](#creating-or-opening-a-channel)

Using your AMQP connection object, you can create a new channel or retrieve an existing one. This will return an AMQPChannel object which has wrapped the basic functionality of a videlalvaro/php-amqplib AMQPChannel object.

```
//Create a new channel
$amqp_channel = $amqp_connection->createChannel();
//OR retrieve an existing channel
$channel_id = 12;
$amqp_channel = $amqp_connection->retrieveExistingChannel($channel_id);
```

Publishing a Single Message
---------------------------

[](#publishing-a-single-message)

Create a transport object with your exchange-specific information and a message object with your message properties. After creating these objects, you pass them into the basicPublish method.

```
$transport = new \Vu\AMQPCarapace\Model\Transport();
$transport->exchange = "php_test";
$transport->routing_key = "php_key";

$message = new \Vu\AMQPCarapace\Model\Message();
$message->body = "This is my message - rawr";
$message->content_type = "text/plain";
$message->content_encoding = "UTF-8";

$amqp_channel->basicPublish($message, $transport);
```

Batch Publishing Messages
-------------------------

[](#batch-publishing-messages)

Use the same transport and message setup as publishing a single message above. Then add each message to the batch publish queue. Finally, call basicPublishBatch();

```
//Create messages 1, 2, and 3...
//Create transport 2

$amqp_channel->addMessageToBatchPublishQueue($message_1, $transport);
$amqp_channel->addMessageToBatchPublishQueue($message_2, $transport);
$amqp_channel->addMessageToBatchPublishQueue($message_3, $transport_2);
$amqp_channel->basicPublishBatch(); //Publishes all 3 messages with their separate transport settings
```

Closing a Channel or Connection
-------------------------------

[](#closing-a-channel-or-connection)

Just simply call close on the channel or connection object

```
$amqp_channel->close();
$amqp_connection->close();
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.8% of commits — single point of failure

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

4301d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ef18f6b55d80f4e63c2b463df7e76cf9d91a6ebeb4613656e9e1d517815230ad?d=identicon)[cerealean](/maintainers/cerealean)

![](https://www.gravatar.com/avatar/42b5d05f6133750d55c371e052d5bf2f6fb0bb045fec0b368149427d9ff3d3d5?d=identicon)[lepermessiah57](/maintainers/lepermessiah57)

![](https://www.gravatar.com/avatar/045795867e28dbb811d7bd2da3af18a56dc4f0bfaec93b825a4a04356ed6ac78?d=identicon)[clarkstuth](/maintainers/clarkstuth)

---

Top Contributors

[![lepermessiah57](https://avatars.githubusercontent.com/u/1280635?v=4)](https://github.com/lepermessiah57 "lepermessiah57 (7 commits)")[![cerealean](https://avatars.githubusercontent.com/u/6100756?v=4)](https://github.com/cerealean "cerealean (5 commits)")[![clarkstuth](https://avatars.githubusercontent.com/u/1616268?v=4)](https://github.com/clarkstuth "clarkstuth (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vu-amqp-carapace/health.svg)

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

###  Alternatives

[friendsofsymfony/rest-bundle

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

2.8k73.3M318](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M292](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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