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

ActiveThink-extend[Queues &amp; Workers](/categories/queues)

k99k5/think-queue-amqp
======================

amqp(RabbitMQ) connector for think-queue

1.1(3y ago)06MITPHPPHP &gt;7.1

Since Sep 29Pushed 3y agoCompare

[ Source](https://github.com/k99k5/think-queue-amqp)[ Packagist](https://packagist.org/packages/k99k5/think-queue-amqp)[ RSS](/packages/k99k5-think-queue-amqp/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

Amp(RabbitMq)
-------------

[](#amprabbitmq)

> 驱动安装: `composer require php-amqplib/php-amqplib ^3.0`
>
> 支持阿里云 账号密码-&gt;实例列表-&gt;静态用户名密码

```
'amqp'   => [
    'type'    => 'amqp',
    'queue'   => 'thinkphp',
    'hosts'   => [
          [
          'host'     => '127.0.0.1',
          'port'     => 5672,
          'user'     => 'guest',
          'password' => 'guest',
          'vhost'    => '/',
          ],
    		],
    'options' => [
        'ssl_options' => [
        'ssl_on'      => false,
        'cafile'      => null,
        'local_cert'  => null,
        'local_key'   => null,
        'verify_peer' => true,
        'passphrase'  => null,
        ],
    ],
],

```

发布任务
----

[](#发布任务)

> `think\facade\Queue::push($job, $data = '', $queue = null)` 和 `think\facade\Queue::later($delay, $job, $data = '', $queue = null)` 两个方法，前者是立即执行，后者是在`$delay`秒后执行

```
$job` 是任务名
单模块的，且命名空间是`app\job`的，比如上面的例子一,写`Job1`类名即可
多模块的，且命名空间是`app\module\job`的，写`model/Job1`即可
其他的需要些完整的类名，比如上面的例子二，需要写完整的类名`app\lib\job\Job2`
如果一个任务类里有多个小任务的话，如上面的例子二，需要用@+方法名`app\lib\job\Job2@task1`、`app\lib\job\Job2@task2

```

`$data` 是你要传到任务里的参数

`$queue` 队列名，指定这个任务是在哪个队列上执行，同下面监控队列的时候指定的队列名,可不填

监听任务并执行
-------

[](#监听任务并执行)

```
&> php think queue:listen

&> php think queue:work

```

两种，具体的可选参数可以输入命令加 `--help` 查看

更多使用
----

[](#更多使用)

> 详情请查看官方文档说明

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

Every ~15 days

Total

2

Last Release

1303d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/628ea07c9c699ff5eeb183ade9e7742ce7304fb4e5b9717f091d66a504c99ea3?d=identicon)[TigerKK](/maintainers/TigerKK)

---

Top Contributors

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

---

Tags

messagequeuerabbitmqthink-queue

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/k99k5-think-queue-amqp/health.svg)

```
[![Health](https://phpackages.com/badges/k99k5-think-queue-amqp/health.svg)](https://phpackages.com/packages/k99k5-think-queue-amqp)
```

###  Alternatives

[php-amqplib/php-amqplib

Formerly videlalvaro/php-amqplib. This library is a pure PHP implementation of the AMQP protocol. It's been tested against RabbitMQ.

4.6k125.3M871](/packages/php-amqplib-php-amqplib)[php-amqplib/rabbitmq-bundle

Integrates php-amqplib with Symfony &amp; RabbitMq. Formerly emag-tech-labs/rabbitmq-bundle, oldsound/rabbitmq-bundle.

1.3k20.1M64](/packages/php-amqplib-rabbitmq-bundle)[bunny/bunny

Performant pure-PHP AMQP (RabbitMQ) non-blocking ReactPHP library

7426.5M37](/packages/bunny-bunny)[pdezwart/php-amqp

PHP AMQP Binding Library

585242.0k2](/packages/pdezwart-php-amqp)[php-amqp/php-amqp

PHP AMQP Binding Library

5855.1k](/packages/php-amqp-php-amqp)[kdyby/rabbitmq

Integrates php-amqplib with RabbitMq and Nette Framework

30693.1k4](/packages/kdyby-rabbitmq)

PHPackages © 2026

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