PHPackages                             jingwu/phpbeanstalk - 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. jingwu/phpbeanstalk

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

jingwu/phpbeanstalk
===================

beanstalkd轻量级的PHP客户端.

0.2.0(6y ago)06682MITPHPPHP &gt;=5.2.1CI failing

Since Sep 27Pushed 6y ago1 watchersCompare

[ Source](https://github.com/jingwu15/phpbeanstalk)[ Packagist](https://packagist.org/packages/jingwu/phpbeanstalk)[ Docs](https://github.com/jingwu15/phpbeanstalk.git)[ RSS](/packages/jingwu-phpbeanstalk/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (12)Used By (2)

BEANSTALK ---- 轻量级 beanstalkd 的 php 客户端

说明
--

[](#说明)

本库可直接操作beanstalkd\[1\]接口，且支持完整的Beanstalk协议。 本库是基于  二次开发。

本库修正了有关网络的部分问题，并完善了单元测试，增加了网络相关的测试脚本。

1. 增加异常类 BeanstalkException
2. 增加了 stream\_timeout 参数，可设置数据流的网络超时时间，以解决网络异常时，客户端僵死问题
3. 增加 force\_reserve\_timeout 参数，强制调用 reserve 时，设置超时时间，默认 1 秒，以解决使用者不注意时，造成的死循环问题
4. 增加网络异常处理，发送数据时，数据长度与发送成功长度不一致时，将抛出异常
5. 增加网络异常处理，接收数据时，连续（默认10次）接收到空数据，将抛出异常
6. 增加日志，通过 trigger\_error 产生，对应的错误级别为：E\_USER\_WARNING
7. 增加 setMaxNetError 方法，设置允许的网络连续错误次数
8. 增加 lastError 方法，用于获取最后一次错误信信息
9. 有关网络问题的测试 请看 batch.md

\[1\]

Copyright &amp; License
-----------------------

[](#copyright--license)

Beanstalk, 轻量级 beanstalkd 的 php 客户端, 版权所有 2018- 菁武. 代码遵守 MIT 协议, 见 LICENSE 文件。

Versions &amp; Requirements
---------------------------

[](#versions--requirements)

0.1.6, PHP &gt;=5.4.0 (in progress)

Usage
-----

[](#usage)

Add `jingwu/phpbeanstalk` as a dependency in your project's `composer.json` file (change version to suit your version of Elasticsearch):

```
    {
        "require": {
            "jingwu/phpbeanstalk": "0.1.6"
        }
    }
```

```

```

单元测试
----

[](#单元测试)

此库中包括单元测试， 你需要先启动 beanstalkd 实例

$ beanstalkd -VV -l 127.0.0.1 -p 11300

执行如下命令，运行单元测试：

$ cd /path/to/beanstalk/src $ phpunit -c ../phpunit.xml

\[1\]

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

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

Recently: every ~4 days

Total

11

Last Release

2325d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

queueSocketbeanstalk

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jingwu-phpbeanstalk/health.svg)

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

###  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.6k129.9M974](/packages/php-amqplib-php-amqplib)[ramsey/collection

A PHP library for representing and manipulating collections.

1.2k513.6M83](/packages/ramsey-collection)[react/socket

Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP

1.3k129.1M440](/packages/react-socket)[davidpersson/beanstalk

Minimalistic PHP client for beanstalkd.

199327.9k8](/packages/davidpersson-beanstalk)[hollodotme/fast-cgi-client

A PHP fast CGI client to send requests (a)synchronously to PHP-FPM.

56425.5M30](/packages/hollodotme-fast-cgi-client)[queue-interop/queue-interop

Promoting the interoperability of MQs objects. Based on Java JMS

48131.3M95](/packages/queue-interop-queue-interop)

PHPackages © 2026

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