PHPackages                             netglue/laminas-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. netglue/laminas-messenger

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

netglue/laminas-messenger
=========================

Easy install and configuration for Symfony messenger in a Mezzio/Laminas application

2.5.0(2mo ago)1489.2k—4.7%4[7 issues](https://github.com/netglue/laminas-messenger/issues)[1 PRs](https://github.com/netglue/laminas-messenger/pulls)3MITPHPPHP ~8.2 || ~8.3 || ~8.4 || ~8.5CI passing

Since Mar 30Pushed 2mo ago4 watchersCompare

[ Source](https://github.com/netglue/laminas-messenger)[ Packagist](https://packagist.org/packages/netglue/laminas-messenger)[ RSS](/packages/netglue-laminas-messenger/feed)WikiDiscussions 2.6.x Synced 1mo ago

READMEChangelog (10)Dependencies (20)Versions (40)Used By (3)

Mezzio/Laminas Factories for Symfony Messenger
==============================================

[](#mezziolaminas-factories-for-symfony-messenger)

[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)

[![Continuous Integration](https://github.com/netglue/laminas-messenger/workflows/Continuous%20Integration/badge.svg)](https://github.com/netglue/laminas-messenger/workflows/Continuous%20Integration/badge.svg)[![Type Coverage](https://camo.githubusercontent.com/1f8db15edeaff7f822603fdb6806c257c600ad321c0ced0bc241ae470075c2b4/68747470733a2f2f73686570686572642e6465762f6769746875622f6e6574676c75652f6c616d696e61732d6d657373656e6765722f636f7665726167652e737667)](https://shepherd.dev/github/netglue/laminas-messenger)

Introduction
------------

[](#introduction)

This library aims to provide a way of getting Symfony Messenger up and running in a Laminas/Mezzio application with minimum fuss.

Portions of this library borrow heavily from [xtreamwayz/expressive-messenger](https://github.com/xtreamwayz/expressive-messenger)

These docs assume that you are familiar with [Symfony Messenger](https://symfony.com/doc/current/messenger.html) and the conventions associated with setting up a [Mezzio application](https://docs.mezzio.dev/mezzio/).

Package Dependencies/Suggestions
--------------------------------

[](#package-dependenciessuggestions)

Because Messenger provides Symfony cli commands to consume queues and process messages amongst other things, this package suggests [laminas/laminas-cli](https://github.com/laminas/laminas-cli). This Symfony CLI integration works on a convention that commands are available in your DI container configuration as a hash map under `config.laminas-cli.commands` using the command name as the key and the container identifier as the value. If that's not how you roll, then you'll still be able to benefit from the command factories, you'll just have to wire them up how you like. If you choose to install `laminas/laminas-cli`, then you'll be able to issue a `vendor/bin/laminas messenger:consume [options]` without much trouble.

If you want to use a transport not shipped by default with Symfony Messenger, such as AMQP, then you'll need to `composer require symfony/amqp-messenger` for example.

Installation &amp; Configuration
--------------------------------

[](#installation--configuration)

```
composer require netglue/laminas-messenger
```

During installation, you will be asked if you want to inject the main config provider `ConfigProvider::class`. This configures the 'consume' and 'debug' cli tools and factories for retry strategies and transport factories. Without further configuration, you still won't have any usable message buses, so there are 3 more config providers available:

- `FailureCommandsConfigProvider::class` configures cli tools that allow you to inspect and manipulate the failure transport/queue and as such require that a failure transport is configured. Manually add this config provider to your setup if you want to configure a failure transport/queue.
- `DefaultCommandBusConfigProvider::class` provides a typical setup for a single command bus retrievable from the container with the key `command_bus`.
- `DefaultEventBusConfigProvider::class` provides a typical setup for an event bus retrievable with `event_bus`

None of those config providers assume anything about your transport setup so in order to get up and running, you should also see the annotated example configurations in [`./docs`](./docs)…

Upgrading from 1.x to 2.x
-------------------------

[](#upgrading-from-1x-to-2x)

- SigTerm Listener
    ----------------

    [](#sigterm-listener)

    Version 2 automatically attaches the SIGTERM listener to the consume command. This means that if you were previously doing this yourself, you should probably remove that listener.
- ### Internal helper traits removed

    [](#internal-helper-traits-removed)

    If you had been writing your own factories and making use of the previously shipped traits, these are all replaced with a collection of static utility methods which are also all now marked as internal.
- ### Inheritance and general BC breaks

    [](#inheritance-and-general-bc-breaks)

    If you were extending any of the shipped factories or classes or factories, you'll get runtime errors due to pretty much everything gaining the final keyword - previously, everything was marked soft `@final` so your SA tools should have warned you about that anyhow.

    There are likely many subtle BC breaks that should generally not affect you if you were using this lib with a configuration only approach *(its intended usage)*. Configuration remains largely unchanged with optional additions only.
- ### Symfony 6.x Compatibility

    [](#symfony-6x-compatibility)

    Version 2 remains compatible with `symfony/messenger@^5.3` and gains compatibility with `^6` - v5 support is not likely to remain for very long though.
- ### Multiple Failure Transports

    [](#multiple-failure-transports)

    V2 comes with support for failure transports assigned to specific receivers along with the existing default failure transport. This means that you can have different failure queues for different message types. You can find [example config here](./docs/example-failure-transports.php).
- ### Static Analysis and Test Coverage Improvements

    [](#static-analysis-and-test-coverage-improvements)

    Types are more refined across the board and the baseline is looking good. A number of psalm types are defined on the main [ConfigProvider](./src/ConfigProvider.php) that you might find useful for annotating your configuration structures.

*fin.*

###  Health Score

60

—

FairBetter than 99% of packages

Maintenance76

Regular maintenance activity

Popularity40

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 63.5% 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 ~62 days

Recently: every ~69 days

Total

36

Last Release

61d ago

Major Versions

0.1.0 → 1.0.02020-09-08

1.7.x-dev → 2.0.02023-04-05

PHP version history (9 changes)0.1.0PHP &gt;=7.3

1.0.2PHP ^7.3 || ~8.0

1.0.4PHP ^7.3 || ~8.0 || ~8.1

1.2.0PHP ^7.3 || ~8.0 || ~8.1 || ~8.2

1.3.0PHP ~8.0 || ~8.1 || ~8.2

1.5.0PHP ~8.1 || ~8.2

2.1.0PHP ~8.1 || ~8.2 || ~8.3

2.3.0PHP ~8.1 || ~8.2 || ~8.3 || ~8.4

2.5.0PHP ~8.2 || ~8.3 || ~8.4 || ~8.5

### Community

Maintainers

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

---

Top Contributors

[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (621 commits)")[![gsteel](https://avatars.githubusercontent.com/u/2803720?v=4)](https://github.com/gsteel "gsteel (194 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (84 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (79 commits)")

---

Tags

laminaslaminas-climezziopsr-11symfony-clisymfony-messenger

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/netglue-laminas-messenger/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

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

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

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6939.5M343](/packages/drupal-core-recommended)[magento/community-edition

Magento 2 (Open Source)

12.1k52.1k10](/packages/magento-community-edition)

PHPackages © 2026

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