PHPackages                             balpom/symfony-messenger-sample - 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. [Database &amp; ORM](/categories/database)
4. /
5. balpom/symfony-messenger-sample

ActiveLibrary[Database &amp; ORM](/categories/database)

balpom/symfony-messenger-sample
===============================

A simple example showing how to initialize and to use a Symfony Messenger with queues

v1.2.2(1y ago)125MITPHPPHP &gt;=8.1

Since May 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/balpom/symfony-messenger-sample)[ Packagist](https://packagist.org/packages/balpom/symfony-messenger-sample)[ Docs](https://www.balpom.ru)[ RSS](/packages/balpom-symfony-messenger-sample/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (6)Versions (6)Used By (0)

symfony-messenger-sample
========================

[](#symfony-messenger-sample)

A simple example showing how to initialize and to use a Symfony Messenger with queues.
--------------------------------------------------------------------------------------

[](#a-simple-example-showing-how-to-initialize-and-to-use-a-symfony-messenger-with-queues)

Not finding a simple and complete example of using the [Symfony Messenger](https://github.com/symfony/messenger/), understandable even to a dummies, I had to spend several days and create it myself. It use Doctrine with sqlite database as Message Bus transport. For Workers running uses [Symfony Console](https://github.com/symfony/console/). Everything was tested in Linux.

### Requirements

[](#requirements)

- **PHP &gt;= 8.1**

### Installation

[](#installation)

#### Using composer (recommended)

[](#using-composer-recommended)

```
composer create balpom/symfony-messenger-sample
```

How to use
----------

[](#how-to-use)

### Simple test

[](#simple-test)

Open console window. Run the command:

```
php bin/console messenger:consume doctrine-async
```

It starts simple Worker, which imitate SMS sending. Now it is waiting for messages to be sent from the queue, which is still empty.

Open another console window. Run the command:

```
php tests/send.php
```

It runs a simple script that adds several messages to the queue. After this, in first console window you may see, how Worker "sending" SMS.

Run the command:

```
php bin/console messenger:stop-workers
```

It stop Worker execution.

### Advanced test

[](#advanced-test)

Open multiple consoles. In each of them, run the command:

```
php bin/console messenger:consume doctrine-async
```

It starts many simple Workers, which imitate SMS sending. Now it is waiting for messages to be sent from the queue, which is still empty.

Open one more console window. Run the command:

```
php tests/sendmany.php
```

It runs a simple script that adds many several messages to the queue. After this, in previously opened consoles you may see, how several Workers "sending" SMS.

Run the command:

```
php bin/console messenger:stop-workers
```

It stop all Workers executions.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

Total

5

Last Release

701d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5604ae7cc0bdc12fd8cf8867f3518ec3c9628f13707f127e700cdac1aec70b56?d=identicon)[balpom](/maintainers/balpom)

---

Top Contributors

[![balpom](https://avatars.githubusercontent.com/u/141855513?v=4)](https://github.com/balpom "balpom (16 commits)")

---

Tags

consolesymfonysqlitedoctrinequeuetransportexampleworkerusageMessengerusesample

### Embed Badge

![Health badge](/badges/balpom-symfony-messenger-sample/health.svg)

```
[![Health](https://phpackages.com/badges/balpom-symfony-messenger-sample/health.svg)](https://phpackages.com/packages/balpom-symfony-messenger-sample)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[bartlett/php-compatinfo-db

Reference Database of all functions, constants, classes, interfaces on PHP standard distribution and about 110 extensions

1183.0k1](/packages/bartlett-php-compatinfo-db)[semhoun/slim-skeleton-mvc

Simple Slim Framework 4 skeleton with Twig, Monolog, Doctrine in Sqlite.

871.3k](/packages/semhoun-slim-skeleton-mvc)

PHPackages © 2026

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