PHPackages                             fatrellis/mqk - 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. fatrellis/mqk

ActiveLibrary

fatrellis/mqk
=============

v0.0.4-alpha(8y ago)15362[4 issues](https://github.com/fatrellis/mqk/issues)PHPPHP &gt;= 5.6

Since Jul 13Pushed 8y ago1 watchersCompare

[ Source](https://github.com/fatrellis/mqk)[ Packagist](https://packagist.org/packages/fatrellis/mqk)[ RSS](/packages/fatrellis-mqk/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (4)Versions (11)Used By (0)

MQK
===

[](#mqk)

MQK是一个简单、高性能的PHP后台任务框架。MQK把复杂的消息队列简化成RPC和事件处理，不需要关心复杂的队列、任务和进程等。 MQK在单核心的VPS上每秒可以处理`20,000+`数据量，在容错模式下每秒可处理`6,000+`。

Install
-------

[](#install)

```
composer require fatrellis/mqk

```

Dependencies
------------

[](#dependencies)

- php 5.6
- redis-server

Usage
-----

[](#usage)

1. 第一步，使用`K::invoke`方法调用方法并传入参数`\K::invoke('\\MQK\\Test\\Calculator::sum', 1, 2)`。

```
\K::invoke('Calculator::sum', 1, 2);
```

2. 创建任意的类文件和静态方法

```
class Calculator
{
    public static function sum($a, $b)
    {
        return $a + $b;
    }
}
```

3. 启动消费程序。debug模式下控制台会输出异步任务的返回结果。

```
$ vendor/bin/mqk run
[2017-07-11 08:14:52] 14327 .NOTICE: Master work on 14327 [] []
[2017-07-11 08:14:56] 14331 .INFO: Message finished and result is 2 [] []

```

开发状态
----

[](#开发状态)

开发中，不推荐用在生产环境中使用。

- 未进行严格的测试，可能存在各种问题。
- 函数参数以json格式进行序列化，不能使用php对象

文档
==

[](#文档)

推荐使用MQK的事件机制可以进行实时数据计算分析。

- [新手入门](docs/getting-started.md)
- [基本使用说明](docs/basic.md)
- [RPC](docs/rpc.md)
- [事件](docs/event.md)
- [最佳实践](docs/practices.md)
- [配置](docs/config.md)
- [错误处理](docs/error.md)
- [高级选项](docs/advanced_options.md)
- [进程健康状态](docs/process_health.md)
- [日志](docs/logging.md)
- [信号](docs/signals.md)
- [扩容](docs/sharding.md)
- [命令行说明](docs/command_line.md)
- [进程管理](docs/process.md)

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

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

Total

4

Last Release

3244d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29561244?v=4)[fatrellis](/maintainers/fatrellis)[@fatrellis](https://github.com/fatrellis)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fatrellis-mqk/health.svg)

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

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9317.2k55](/packages/open-dxp-opendxp)

PHPackages © 2026

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