PHPackages                             php-lucky-queue/queue - 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. php-lucky-queue/queue

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

php-lucky-queue/queue
=====================

v1.0.13(2y ago)226PHPPHP &gt;=7.1

Since Jul 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/iqny/php-lucky-queue)[ Packagist](https://packagist.org/packages/php-lucky-queue/queue)[ RSS](/packages/php-lucky-queue-queue/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)DependenciesVersions (10)Used By (0)

php-lucky-queue
===============

[](#php-lucky-queue)

redis 支持php-redis扩展，predis。默认安装predis,如果选择redis扩展需要自行安装

rabbitmq 支持php-amqp。如果选择rabbitmq需安装php-amqp扩展 按需求安装对应版本：

redis扩展：

amqp扩展：

必须安装sysvmsg扩展

ipcs进程间通信，客户端从数据源获取到任务分发到消息队列，work进行消息，再把消息任务id返回给客户端进行确认

```
第一步：composer require php-lucky-queue/queue

```

```
第二步：php artisan vendor:publish --provider="PhpLuckyQueue\Queue\LuckyQueueProvider"

```

```
第三步：在.env文件添加如下配置
QUEUE_DRIVE=rabbitmq
QUEUE_REDIS_HOST=127.0.0.1
QUEUE_REDIS_DRIVE=redis
QUEUE_REDIS_PORT=6379
QUEUE_REDIS_DB=12
QUEUE_REDIS_PASSWORD=null
QUEUE_RABBITMQ_HOST=127.0.0.1
QUEUE_RABBITMQ_PORT=5672
QUEUE_RABBITMQ_LOGIN=
QUEUE_RABBITMQ_PASSWORD=
QUEUE_RABBITMQ_EXCHANGE=my_exchange
QUEUE_RABBITMQ_VHOST="/"
QUEUE_ROCKETMQ_HOST=''
QUEUE_ROCKETMQ_ACCESS_KEY=''
QUEUE_ROCKETMQ_SECRET_KEY=''
QUEUE_ROCKETMQ_INSTANCE_ID=''
QUEUE_ROCKETMQ_TOPIC=''
QUEUE_ROCKETMQ_GROUP_ID=''
QUEUE_ROCKETMQ_NUM_OF_MESSAGES=1
QUEUE_ROCKETMQ_WAIT_SECONDS=1
QUEUE_HEARTBEAT=120

```

```
第四步：操作完以上步骤，在app/LuckyQueue目录下编写任务

```

### 队列特点：

[](#队列特点)

```
1、支持平滑的重启队列重新读取配置文件
2、在默认驱动情况下，可以配置某个队列启动指定驱动[redis|rabbitmq]
3、默认队列任务每1个小时自动退出1次，防止内存溢出。
4、可以配置队列在执行指定任务次数自动退出，防止内存溢出
5、日志目录在storage/logs/queue，按每天创建目录，
   支持多种日志类型记录：debug|info|alert|notice|warning|critical|emergency|error
6、执行失败的任务记录在failed_jobs表

```

命令：

```
php artisan queue:lucky start              启动

```

```
php artisan queue:lucky start --daemon=1   守护进程启动

```

```
php artisan queue:lucky stop               停止

```

```
php artisan queue:lucky restart            重启

```

### Example

[](#example)

公共函数：luckyPush($queueName,$msg);

```

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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 ~54 days

Total

9

Last Release

972d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/747ddf3bec71c0c7c9ae3d314534089529eebe6b895cf261451192c6dbd42f76?d=identicon)[iqny](/maintainers/iqny)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/php-lucky-queue-queue/health.svg)

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

###  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.8M171](/packages/react-async)

PHPackages © 2026

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