PHPackages                             n3ttech/messeging - 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. n3ttech/messeging

ActiveLibrary

n3ttech/messeging
=================

CQRS + ES for php

1.3.5(6y ago)0292MITPHPPHP &gt;=7.3CI failing

Since Oct 25Pushed 6y ago1 watchersCompare

[ Source](https://github.com/gabrielalon/messeging)[ Packagist](https://packagist.org/packages/n3ttech/messeging)[ RSS](/packages/n3ttech-messeging/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (8)Versions (14)Used By (2)

\#Library for handling CQRS and ES

1. Define event bus

```
use N3tt3ch\Messaging\Event;

$eventRouterFactory = new Event\EventRouting\EventRouterFactory();
$eventTransporterFactory = new Event\EventTransporting\EventTransporterFactory(
	$eventRouterFactory->fromDirectory('path to directory with event map'),
	new Event\EventSourcing\EventProjectionProvider($container)
);

$eventBus = new Event\EventBus($eventTransporterFactory->createDefault());
```

Further we need to create event storage and event stream

```
use N3tt3ch\Messaging\Event;
use N3tt3ch\Messaging\Snapshot;

$snapshotStorage = new Snapshot\SnapshotStore\SnapshotStorage($container->get(Snapshot\Persist\SnapshotRepository::class));
$eventStorageFactory = new Event\EventStore\EventStorageFactory($container->get(Event\Persist\EventStreamRepository::class));
$eventStorage = $eventStorageFactory->create($eventBus);

$someAggregateRepository = new SomeAggregateRepository($eventStorage, $snapshotStorage);
```

2. Define command bus

```
use N3tt3ch\Messaging\Command;

$commandHandlerProvider = new Command\CommandHandling\CommandHandlerProvider($container);
$commandRouterFactory = new Command\CommandRouting\CommandRouterFactory($commandHandlerProvider);
$commandTransporterFactory = new Command\CommandTransporting\CommandTransporterFactory($commandRouterFactory->createDefault());

$commandBus = new Command\CommandBus($commandTransporterFactory->createDefault());
```

3. Define query bus

```
use N3tt3ch\Messaging\Query;

$queryHandlerProvider = new Query\QueryHandling\QueryHandlerProvider($container);
$queryRouterFactory = new Query\QueryRouting\QueryRouterFactory($queryHandlerProvider);
$queryTransporterFactory = new Query\QueryTransporting\QueryTransporterFactory($queryRouterFactory->createDefault());

$queryBus = new Query\QueryBus($queryTransporterFactory->createDefault());
```

You can use your own message transports. You can use your own message naming strategies.

Please view transport and routing factories.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 64.7% 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

13

Last Release

2355d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4741059?v=4)[marol](/maintainers/gabrielalon)[@gabrielalon](https://github.com/gabrielalon)

---

Top Contributors

[![marekrode29](https://avatars.githubusercontent.com/u/25474047?v=4)](https://github.com/marekrode29 "marekrode29 (11 commits)")[![gabrielalon](https://avatars.githubusercontent.com/u/4741059?v=4)](https://github.com/gabrielalon "gabrielalon (6 commits)")

---

Tags

messagingcommand busevent busquery-bus

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/n3ttech-messeging/health.svg)

```
[![Health](https://phpackages.com/badges/n3ttech-messeging/health.svg)](https://phpackages.com/packages/n3ttech-messeging)
```

###  Alternatives

[prooph/service-bus-symfony-bundle

88392.2k3](/packages/prooph-service-bus-symfony-bundle)[enqueue/enqueue

Message Queue Library

19820.0M56](/packages/enqueue-enqueue)[simple-bus/message-bus

Generic classes and interfaces for messages and message buses

3455.7M30](/packages/simple-bus-message-bus)[simple-bus/symfony-bridge

Bridge for using command buses and event buses in Symfony projects

1314.3M19](/packages/simple-bus-symfony-bridge)[simple-bus/asynchronous

Generic classes and interfaces for asynchronous messaging using SimpleBus

241.5M6](/packages/simple-bus-asynchronous)[simple-bus/doctrine-orm-bridge

Doctrine ORM bridge for using command and event buses

292.1M9](/packages/simple-bus-doctrine-orm-bridge)

PHPackages © 2026

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