PHPackages                             pandasir/rabbitmq - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. pandasir/rabbitmq

ActiveLibrary[Queues &amp; Workers](/categories/queues)

pandasir/rabbitmq
=================

This is package for RabbitMq

v1.0(6y ago)34Apache-2.0PHPPHP &gt;=5.4.0

Since Nov 19Pushed 6y ago1 watchersCompare

[ Source](https://github.com/pandasir/rabbitmq)[ Packagist](https://packagist.org/packages/pandasir/rabbitmq)[ RSS](/packages/pandasir-rabbitmq/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

#### RabbitMq 包使用示例

[](#rabbitmq-包使用示例)

1.**创建exchange**

```
$config = [
    'default'   => [
        'host'      => '132.75.114.99',
        'port'      => 5672,
        'login'     => 'admin',
        'password'  => 'abc',
        'vhost'     => 'admin'
    ]
];
include './vendor/autoload.php';
try{
     $mq = new \pandaSir\Mq\Connection\AMQPConnection($config);
     $channel = $mq->channel();
     $exchange = $channel->exchange('jia.task', AMQP_EX_TYPE_TOPIC, false, true);
}catch (\Exception $e){
     var_dump($e->getMessage());die;
}
```

2.**创建队列**

```
include './vendor/autoload.php';
try{
     $mq = new \pandaSir\Mq\Connection\AMQPConnection($config);
     $channel = $mq->channel();
     $queue   = $channel->queue('test_queue')
}catch (\Exception $e){
     var_dump($e->getMessage());die;
}
```

3.**发送消息**

```
include './vendor/autoload.php';
try{
     $mq = new \pandaSir\Mq\Connection\AMQPConnection($config);
     $channel = $mq->channel();
     $result = $channel->basicPublish('name is jack', 'jia.task', 'test', [
             'delivery_mode' => 2
         ]);
}catch (\Exception $e){
     var_dump($e->getMessage());die;
}
```

4.**队列消费**

```
include './vendor/autoload.php';
try{
     $mq = new \pandaSir\Mq\Connection\AMQPConnection($config);
     $channel = $mq->channel();
     $callback = function (AMQPEnvelope $msg, AMQPQueue $queue) {
         var_dump($msg->getBody());
         $queue->ack($msg->getDeliveryTag());
     };
     $channel->basicConsume('test', $callback, true);
}catch (\Exception $e){
     var_dump($e->getMessage());die;
}
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

2363d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e29f9380f645895b74b4abc7ea051dfd80f23654e28b43872368ea62d43c8a7?d=identicon)[panda](/maintainers/panda)

---

Top Contributors

[![pandasir](https://avatars.githubusercontent.com/u/20355918?v=4)](https://github.com/pandasir "pandasir (4 commits)")

### Embed Badge

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

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

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.3M26](/packages/league-geotools)[amphp/parser

A generator parser to make streaming parsers simple.

14952.8M16](/packages/amphp-parser)[amphp/serialization

Serialization tools for IPC and data storage in PHP.

13451.1M18](/packages/amphp-serialization)[enqueue/enqueue

Message Queue Library

19820.0M56](/packages/enqueue-enqueue)[deliciousbrains/wp-background-processing

WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.

1.1k409.8k6](/packages/deliciousbrains-wp-background-processing)[react/async

Async utilities and fibers for ReactPHP

2238.8M170](/packages/react-async)

PHPackages © 2026

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