PHPackages                             oyym/async-center - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. oyym/async-center

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

oyym/async-center
=================

async manage code decoupling

401PHP

Since May 4Pushed 3y ago1 watchersCompare

[ Source](https://github.com/oyym123/sync)[ Packagist](https://packagist.org/packages/oyym/async-center)[ RSS](/packages/oyym-async-center/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Async Center
============

[](#async-center)

PHP + Swoole + Rabbitmq + Redis 实现并发异步处理

TPS：

```
由于Swoole的原因，只能在linux环境运行，请勿在windows环境中启动。
php需安装 amqp、redis、swoole扩展
PHP版本 默认 > 7.0   8.0版本没有试过

```

安装

```
 composer require oyym/async-center

```

一、简介：

```
  1、一个可独立运行的异步服务中心，支持 Cli 以及 Http 的形式发送并发请求

  2、支持TCC事务机制

  3、支持灵活的重试机制

  4、具有完善的日志信息

  5、可界面化操作进程

```

二、 解决的问题点：

```
  1、将多进程异步并发操作跟业务代码完全分离开，减少多进程编写的心智负担

  2、支持tcc分布式事务，以及重试机制

  3、灵活的重试补偿机制，保证程序运行的稳定

  4、可以作为独立的服务运行，无需嵌入主程序代码中

  5、几分钟搞定一个多进程操作

```

swoole扩展安装教程：

```
https://zhuanlan.zhihu.com/p/106764018
目前只支持4.4.12 及以下版本的 swoole

```

Laravel集成

```
   第一步：
       composer require oyym/async-center

   第二步：
       将vendor/oyym/async-center/example/laravel-demo/Commands 下的三个文件移到 app/Console/Commands下
       将vendor/oyym/async-center/example/laravel-demo/config 下的两个文件移到 app/config下
       将vendor/oyym/async-center/example/laravel-demo/Controllers 下的一个文件移到 app/Http/Controllers下
       最后添加路由 Route::any('async', 'AsyncController@list');

   第三步：
       填写好 config/async.php中的 rabbitmq 和 redis 配置文件

   第四步：
       给app/config 、 app/storage 设置可写入的权限
       chmod -r 777 app/config
       chmod -r 777 app/storage

       访问：http://localhouse/async  加上配置文件 点击启动

       根目录下执行测试命令
       php artisan async-test content

       即可以在界面上看到对应的回调日志

       如果需开启重试机制 需要加上定时任务
       * * * * *  cd /代码根目录 &&  php artisan async-retry

```

界面展示 [![image](https://user-images.githubusercontent.com/20701868/232002756-3e2f7b21-8f41-4b1c-96dc-2c5a4ae547bc.png)](https://user-images.githubusercontent.com/20701868/232002756-3e2f7b21-8f41-4b1c-96dc-2c5a4ae547bc.png)

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/oyym-async-center/health.svg)

```
[![Health](https://phpackages.com/badges/oyym-async-center/health.svg)](https://phpackages.com/packages/oyym-async-center)
```

###  Alternatives

[sqhlib/hanzi-convert

PHP中文繁简体字转换程序，支持繁体转简体或简体转繁体

12327.6k](/packages/sqhlib-hanzi-convert)[nyholm/effective-interest-rate

A library to calculate effective interest rate. Also know as XIRR or effective APR.

24169.4k](/packages/nyholm-effective-interest-rate)[barnabywalters/mf-cleaner

Cleans up microformats2 array structures

146.8k4](/packages/barnabywalters-mf-cleaner)

PHPackages © 2026

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