PHPackages                             michel/pqueue-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. michel/pqueue-bundle

ActiveSymfony-bundle[Queues &amp; Workers](/categories/queues)

michel/pqueue-bundle
====================

PQueueBundle is a Symfony bundle that integrates Pqueue, a minimalist PHP library for processing background messages using a single persistent CLI.

0.0.1-alpha(8mo ago)00MPL-2.0PHPPHP &gt;=7.4

Since Dec 15Pushed 8mo agoCompare

[ Source](https://github.com/michelphp/pqueue-bundle)[ Packagist](https://packagist.org/packages/michel/pqueue-bundle)[ RSS](/packages/michel-pqueue-bundle/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (9)Versions (2)Used By (0)

PQueueBundle
============

[](#pqueuebundle)

Integration of [michel/pqueue](https://github.com/michelphp/pqueue) into Symfony.

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

[](#installation)

```
composer require michel/pqueue-bundle
```

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

[](#configuration)

Create a configuration file `config/packages/pqueue.yaml`:

```
pqueue:
    transport:
        class: 'Michel\PQueue\Transport\FilesystemTransport'
        options:
            directory: '%kernel.project_dir%/var/pqueue'

    handlers:
        # Auto-discovery of handlers in these directories
        sources:
            - '%kernel.project_dir%/src/MessageHandler'
```

Usage
-----

[](#usage)

### 1. Create a Message and Handler

[](#1-create-a-message-and-handler)

First, define a message class:

```
// src/Message/EmailNotification.php
namespace App\Message;

class EmailNotification
{
    public function __construct(
        public int $userId
    ) {}
}
```

Then, create a handler for it:

```
// src/MessageHandler/EmailNotificationHandler.php
namespace App\MessageHandler;

use App\Message\EmailNotification;

class EmailNotificationHandler
{
    public function __invoke(EmailNotification $message): void
    {
        // Process message for user $message->userId
    }
}
```

*Note: The handler is automatically discovered if it is in one of the configured source directories. It must implement `__invoke` with a single argument type-hinted with the message class.*

### 2. Dispatch a Message

[](#2-dispatch-a-message)

Inject `Michel\PQueue\PQueueDispatcher` and send a message:

```
use Michel\PQueue\PQueueDispatcher;
use App\Message\EmailNotification;

public function index(PQueueDispatcher $dispatcher)
{
    $dispatcher->send(new EmailNotification(123));
}
```

### 3. Run the Worker

[](#3-run-the-worker)

```
php bin/console pqueue:worker:run
```

License
-------

[](#license)

This bundle is released under the [MPL-2.0 License](LICENSE).

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance61

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity21

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

246d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/909a078010ad44ff35146af8288451a3b6fd26f81cb198cbea776a92553c9b8a?d=identicon)[F.Michel](/maintainers/F.Michel)

---

Top Contributors

[![michelphp](https://avatars.githubusercontent.com/u/26349908?v=4)](https://github.com/michelphp "michelphp (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/michel-pqueue-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/michel-pqueue-bundle/health.svg)](https://phpackages.com/packages/michel-pqueue-bundle)
```

###  Alternatives

[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M674](/packages/shopware-core)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

86337.5k](/packages/flow-php-flow)

PHPackages © 2026

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