PHPackages                             hadenting/laravel-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. hadenting/laravel-amqp

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

hadenting/laravel-amqp
======================

在laravel框架内快速使用amqp

1.0.0(2y ago)03MITPHP

Since Jan 12Pushed 2y ago1 watchersCompare

[ Source](https://github.com/hadenting/laravel-amqp)[ Packagist](https://packagist.org/packages/hadenting/laravel-amqp)[ RSS](/packages/hadenting-laravel-amqp/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

laravel-amqp
============

[](#laravel-amqp)

laravel 快速使用 amqp

使用说明
----

[](#使用说明)

### 1. 安装

[](#1-安装)

`composer require hadenting/laravel-amqp`

### 2. 发布

[](#2-发布)

`php artisan vendor:publish --provider="Hadenting\Amqp\MongooerConrmqProvider"`

生成配置文件`amqp.php`，插件会默认使用 `connections` 数组中的 `default` 连接。

### 3. 生产和消费

[](#3-生产和消费)

使用sendJson快捷的发送json

```
AMQP::connection()->sendJson("exchange", "queue", "routingKey", '{"a":"1"}');

```

使用sendMessage发送

```
AMQP::connection()->sendMessage("exchange", "queue", "routingKey",
    (new AMQPMessage('{"a":"1"}', [
        'content_type' => 'application/json',
        'delivery_mode' => AMQPMessage::DELIVERY_MODE_PERSISTENT
    ])));

```

使用listener监听

```
AMQP::connection()->listener("exchange", "queue", "routingKey", function (AMQPMessage $message) {

});

```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

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

851d ago

### Community

Maintainers

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

### Embed Badge

![Health badge](/badges/hadenting-laravel-amqp/health.svg)

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

###  Alternatives

[binaryk/laravel-restify

Laravel REST API helpers

651399.1k](/packages/binaryk-laravel-restify)[namu/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

54324.5k](/packages/namu-wirechat)[lomkit/laravel-rest-api

A package to build quick and robust rest api for the Laravel framework.

59152.2k](/packages/lomkit-laravel-rest-api)[wirechat/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

5434.7k](/packages/wirechat-wirechat)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[georgeboot/laravel-echo-api-gateway

Use Laravel Echo with API Gateway Websockets

10435.5k](/packages/georgeboot-laravel-echo-api-gateway)

PHPackages © 2026

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