PHPackages                             zlikavac32/beanstalkd-lib-bundle - 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. zlikavac32/beanstalkd-lib-bundle

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

zlikavac32/beanstalkd-lib-bundle
================================

Bundle for zlikavac32/beanstalkd-lib

0.3.0(6y ago)023MITPHPPHP ^7.4CI failing

Since May 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/zlikavac32/beanstalkd-lib-bundle)[ Packagist](https://packagist.org/packages/zlikavac32/beanstalkd-lib-bundle)[ RSS](/packages/zlikavac32-beanstalkd-lib-bundle/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (13)Versions (7)Used By (0)

Beanstalkd lib bundle
=====================

[](#beanstalkd-lib-bundle)

[![Build Status](https://camo.githubusercontent.com/386f7bacdd77e683f4c564fc4cbec774946d4d4c2b51c6a3f5faec5450419477/68747470733a2f2f7472617669732d63692e6f72672f7a6c696b6176616333322f6265616e7374616c6b642d6c69622d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/zlikavac32/beanstalkd-lib-bundle)

Bundle for [zlikavac32/beanstalkd-lib](https://github.com/zlikavac32/beanstalkd-lib)

Table of contents
-----------------

[](#table-of-contents)

1. [Installation](#installation)
2. [Configuration](#configuration)
3. [Usage](#usage)
    1. [Tube definition](#tube-definition)
    2. [Runner definition](#runner-definition)
    3. [Server controller](#server-controller)
4. [Examples](#examples)

Installation
------------

[](#installation)

Recommended installation is through Composer.

```
composer require zlikavac32/beanstalkd-lib-bundle

```

Bundle must be enabled in `config/bundles.php`.

```
return [
    /* ... */

    Zlikavac32\BeanstalkdLibBundle\BeanstalkdLibBundle::class => ['all' => true],

    /* ... */
]
```

Next add default configuration entry for `beanstalkd_lib`. For example, in `config/services/beanstalkd_lib.yaml`. Check [Configuration](#configuration) section for more info.

```
beanstalkd_lib: ~
```

This library uses [zlikavac32/nsb-decorators](https://github.com/zlikavac32/nsb-decorators) which requires custom autoloader in application entry points like `bin/console`.

```
use Zlikavac32\NSBDecorators\Proxy;

/* ... */

spl_autoload_register(Proxy::class.'::loadFQN');
```

For now, since proxied decorators are evaluated, container requires must not be inlined (`container.dumper.inline_class_loader` parameter must not exist or be set to `false`).

Async signals are also a requirement.

```
pcntl_async_signals(true);
```

Configuration
-------------

[](#configuration)

Default configuration looks like:

```
beanstalkd_lib:
    adapters:
        socket: Zlikavac32\BeanstalkdLib\Adapter\PHP\Socket\NativePHPSocket
        yaml_parser: Zlikavac32\BeanstalkdLib\Adapter\Symfony\Yaml\SymfonyYamlParser
    server:
        host: 127.0.0.1
        port: 11300
```

Custom adapters can be implemented for better integration with existing software.

Usage
-----

[](#usage)

This section explains how to use this bundle.

### Tube definition

[](#tube-definition)

To use beanstalkd lib client, every managed tube must be configured.

```
tube.domain_tube: # keys value itself is not important to the bundle
    class: Zlikavac32\BeanstalkdLib\Client\TubeConfiguration\StaticTubeConfiguration
    arguments:
        $defaultDelay: 0
        $defaultPriority: 1024
        $defaultTimeToRun: 60
        $defaultTubePauseDelay: 86400
        $serializer: '@DomainSerializer'
    tags:
        - { name: tube_configuration, tube: brute_force_hash }
```

Tag `tube_configuration` collects tube configurations and links them with the client.

Optionally, one could also use `linker` tag to link with the serializer, as can be seen in the [examples/full/container.yaml](examples/full/container.yaml).

### Runner definition

[](#runner-definition)

To define tube runner, we can use `job_runner` tag. This tag collects runners and links them with the job dispatcher.

```
Foo\Runner\SomeRunnerClass:
    tags:
        - { name: job_runner, tube: tube_for_this_runner }
```

Additional decorators can be applied either manually or through `decorator` tag, as can be seen in the [examples/full/container.yaml](examples/full/container.yaml).

To run existing runners, use `bin/console worker:run`.

### Server controller

[](#server-controller)

Simple REPL controller for the client is provided as `bin/console worker:controller`. It can be used also to run standalone commands.

[![Server controller demo](docs/res/img/server-controller.webp)](docs/res/img/server-controller.webp)

Features include:

- list tubes
- pause/unpause tubes
- print stats (with optional refresh)
- flush tube/tubes

To use pager in `peek` command, evironment variable `PAGER` must be set to a pager program. `less` is one such program whcih can be used directly like `PAGER=less bin/console ...` or exported somewhere.

For `less`, additional environment variable `LESS` that describes `less` arguments can be defined. For example, `LESS='-F' PAGER=less bin/console` can be used to skip paging if the whole text can be displayed on screen.

In Docker, `-R` should be used to display color escape sequences correctly.

Examples
--------

[](#examples)

You can see more examples with code comments in [examples](/examples).

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

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

Recently: every ~85 days

Total

6

Last Release

2226d ago

PHP version history (2 changes)0.1.0PHP ^7.2

0.2.0PHP ^7.4

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

beanstalkdjob-queuesymfonysymfony-bundleworkerworker-queuesymfonybundlequeuejobbeanstalkdworker

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zlikavac32-beanstalkd-lib-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/zlikavac32-beanstalkd-lib-bundle/health.svg)](https://phpackages.com/packages/zlikavac32-beanstalkd-lib-bundle)
```

###  Alternatives

[koco/messenger-kafka

Symfony Messenger Kafka Transport

931.1M1](/packages/koco-messenger-kafka)[riverline/worker-bundle

Symfony2 Bundle to use queue with workers

1077.6k](/packages/riverline-worker-bundle)[cmsig/seal-symfony-bundle

An integration of CMS-IG SEAL search abstraction into Symfony Framework.

15195.8k5](/packages/cmsig-seal-symfony-bundle)

PHPackages © 2026

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