PHPackages                             thomasvargiu/zf-messenger - 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. thomasvargiu/zf-messenger

Abandoned → [thomasvargiu/laminas-messenger](/?search=thomasvargiu%2Flaminas-messenger)ArchivedLibrary[Queues &amp; Workers](/categories/queues)

thomasvargiu/zf-messenger
=========================

ZF factories to use the Symfony Messenger in ZF2 and expressive applications

0.2.0(6y ago)1286MITPHPPHP ^7.1

Since Nov 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/thomasvargiu/zf-messenger)[ Packagist](https://packagist.org/packages/thomasvargiu/zf-messenger)[ RSS](/packages/thomasvargiu-zf-messenger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (14)Versions (6)Used By (0)

zf-messenger
============

[](#zf-messenger)

Archived Project
================

[](#archived-project)

This project is abandoned. You should use [`thomasvargiu/laminas-messenger`](https://github.com/thomasvargiu/laminas-messenger).

[![Latest Stable Version](https://camo.githubusercontent.com/9b0a0c8e215b1121d378975f4a8307fcc843d0eb3caf3e044ba5c4c700e1cd19/68747470733a2f2f706f7365722e707567782e6f72672f74686f6d61737661726769752f7a662d6d657373656e6765722f762f737461626c65)](https://packagist.org/packages/thomasvargiu/zf-messenger)[![Total Downloads](https://camo.githubusercontent.com/f62954264dfe76f4d569557aebf0d153c64ba527b4384470c0fe49c6b0dd5bd2/68747470733a2f2f706f7365722e707567782e6f72672f74686f6d61737661726769752f7a662d6d657373656e6765722f646f776e6c6f616473)](https://packagist.org/packages/thomasvargiu/zf-messenger)[![License](https://camo.githubusercontent.com/764cba658477c85db236715d93bd197bb8d8a1f23873dc2a911fcc6cf0124ee7/68747470733a2f2f706f7365722e707567782e6f72672f74686f6d61737661726769752f7a662d6d657373656e6765722f6c6963656e7365)](https://packagist.org/packages/thomasvargiu/zf-messenger)[![Code Coverage](https://camo.githubusercontent.com/a8972dc22747247f4a4a74a4ba968e95928440be294d1e8073f3bbaa90fac5d2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74686f6d61737661726769752f7a662d6d657373656e6765722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/thomasvargiu/zf-messenger/?branch=master)[![Build Status](https://camo.githubusercontent.com/ab269c7c5763336253a82da1bf8edd71fd31ac23ae87ce85fd0a808521dbd86f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74686f6d61737661726769752f7a662d6d657373656e6765722f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/thomasvargiu/zf-messenger/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b7c9e350f4de3680e54cfc1847f4912f251ff36ab4d596f6171d87c08c52fd15/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74686f6d61737661726769752f7a662d6d657373656e6765722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/thomasvargiu/zf-messenger/?branch=master)

ZF factories to use the Symfony Messenger in ZF2 and expressive applications

Usage
-----

[](#usage)

You need to add console commands to your application. The following command services are already configured for you:

- `Symfony\Component\Messenger\Command\ConsumeMessagesCommand`
- `Symfony\Component\Messenger\Command\SetupTransportsCommand`
- `Symfony\Component\Messenger\Command\FailedMessagesRemoveCommand`
- `Symfony\Component\Messenger\Command\FailedMessagesRetryCommand`
- `Symfony\Component\Messenger\Command\FailedMessagesShowCommand`
- `Symfony\Component\Messenger\Command\StopWorkersCommand` (see note below)

To use the `Symfony\Component\Messenger\Command\StopWorkersCommand` command you should set a `CacheItemPoolInterface`implementation (see below).

A default message bus is already configured for you with the following service name: `messenger.bus.default`. You can read the [Symfony documentation](https://symfony.com/doc/current/components/messenger.html) to know how to use it.

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

[](#configuration)

This is an example configuration:

```
use TMV\Messenger\Factory;
use Symfony\Component\Messenger;

return [
    'dependencies' => [
        'factories' => [
            'messenger.bus.foo' => [Factory\MessageBusFactory::class, 'messenger.bus.foo'], // the name must be the same as the bus configuration key
            'messenger.transport.async' => [Factory\Transport\TransportFactory::class, 'messenger.transport.async'], // the name must be the same as the transport configuration key
        ],
    ],
    'messenger' => [
        'failure_transport' => null, // your failure transport service name (optional)
        'logger' => null, // your custom logger service name (optional)
        'default_serializer' => SFMessenger\Transport\Serialization\PhpSerializer::class, // default messenger serializer, it should be a service name
        'cache_pool_for_restart_signal' => null, // CacheItemPoolInterface service name implementation if you want to use stop workers command
        'transport_factories' => [
            // here you can add your custom transport factories services
        ],
        'buses' => [
            'messenger.bus.foo' => [ // bus service name, it should be registered as a service with the same name
                'default_middleware' => true, // if you want to include default middleware (default: true)
                'middleware' => [ // your custom middleware service names
                    My\FooMiddleware::class,
                ],
                'allow_no_handler' => false, // allow no handlers (default: false)
                'handlers' => [ // your handlers
                    My\FooMessageType::class => [
                        My\FooMessageHandler::class,
                    ],
                ],
                'routes' => [
                    My\FooMessageType::class => ['messenger.transport.async'], // route message types to this transport
                ],
            ],
        ],
        'transports' => [
            'messenger.transport.async' => [
                'dsn' => 'amqp://guest:guest@rabbitmq:5672',
                'serializer' => Messenger\Transport\Serialization\PhpSerializer::class, // custom serializer service
                'options' => [
                    'exchange' => [
                        'name' => 'messenger_events',
                    ],
                    'queues' => [
                        'messenger_events' => [],
                    ],
                ],
                'retry_strategy' => [
                    'max_retries' => 3,
                    'delay' => 1000,
                    'multiplier' => 2,
                    'max_delay' => 0,
                ],
            ],
        ],
    ],
];
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

Total

4

Last Release

2355d ago

### Community

Maintainers

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

---

Top Contributors

[![thomasvargiu](https://avatars.githubusercontent.com/u/732012?v=4)](https://github.com/thomasvargiu "thomasvargiu (19 commits)")

---

Tags

messagesymfonyfactoryzendmessagingmoduleAMQPbusexpressiveMessengerservice-bussymfony-messenger

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/thomasvargiu-zf-messenger/health.svg)

```
[![Health](https://phpackages.com/badges/thomasvargiu-zf-messenger/health.svg)](https://phpackages.com/packages/thomasvargiu-zf-messenger)
```

###  Alternatives

[php-amqplib/rabbitmq-bundle

Integrates php-amqplib with Symfony &amp; RabbitMq. Formerly emag-tech-labs/rabbitmq-bundle, oldsound/rabbitmq-bundle.

1.3k20.1M65](/packages/php-amqplib-rabbitmq-bundle)[okvpn/cron-bundle

Docker friendly Symfony cron bundle for handle scheduled tasks consistently, parallel or across a cluster, like Symfony Messenger

19498.7k1](/packages/okvpn-cron-bundle)

PHPackages © 2026

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