PHPackages                             rekalogika/domain-event-outbox - 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. rekalogika/domain-event-outbox

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

rekalogika/domain-event-outbox
==============================

Implementation of the transactional outbox pattern on top of rekalogika/domain-event

2.5.2(1y ago)22.7kMITPHP

Since Mar 11Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/rekalogika/domain-event-outbox)[ Packagist](https://packagist.org/packages/rekalogika/domain-event-outbox)[ Docs](https://rekalogika.dev/domain-event)[ GitHub Sponsors](https://github.com/priyadi)[ RSS](/packages/rekalogika-domain-event-outbox/feed)WikiDiscussions main Synced 1mo ago

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

rekalogika/domain-event-outbox
==============================

[](#rekalogikadomain-event-outbox)

Implementation of the transactional outbox pattern on top of the `rekalogika/domain-event` package.

Full documentation is available at [rekalogika.dev/domain-event](https://rekalogika.dev/domain-event).

Synopsis
--------

[](#synopsis)

```
//
// The event
//

final readonly class PostChanged
{
    public function __construct(public string $postId) {}
}

//
// The entity
//

use Rekalogika\Contracts\DomainEvent\DomainEventEmitterInterface;
use Rekalogika\Contracts\DomainEvent\DomainEventEmitterTrait;

class Post implements DomainEventEmitterInterface
{
    use DomainEventEmitterTrait;

    // ...

    public function setTitle(string $title): void
    {
        $this->title = $title;
        // highlight-next-line
        $this->recordEvent(new PostChanged($this->id));
    }

    // ...
}

//
// The listener
//

use Psr\Log\LoggerInterface;
use Rekalogika\Contracts\DomainEvent\Attribute\AsPublishedDomainEventListener;

class PostEventListener
{
    public function __construct(private LoggerInterface $logger) {}

    // highlight-next-line
    #[AsPublishedDomainEventListener]
    public function onPostChanged(PostChanged $event) {
        $postId = $event->postId;

        $this->logger->info("Post $postId has been changed.");
    }
}

//
// The caller
//

use Doctrine\ORM\EntityManagerInterface;

/** @var Post $post */
/** @var EntityManagerInterface $entityManager */

$post->setTitle('New title');
$entityManager->flush();

// During the flush above, the event will be recorded in the outbox table in the
// database. Then the message relay service is executed, and will publish the
// events on the event bus. When the event bus announces the event, the listener
// will be executed.
```

Documentation
-------------

[](#documentation)

[rekalogika.dev/domain-event](https://rekalogika.dev/domain-event).

License
-------

[](#license)

MIT

Contributing
------------

[](#contributing)

The `rekalogika/domain-event-outbox` repository is a read-only repo split from the main repo. Issues and pull requests should be submitted to the [rekalogika/domain-event-src](https://github.com/rekalogika/domain-event-src)monorepo.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance66

Regular maintenance activity

Popularity24

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Recently: every ~78 days

Total

13

Last Release

399d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/13d0eed333cf2f0d552e9a4d0ca1c6a8fc0be0506bbc5e7516f6985b17b86043?d=identicon)[priyadi](/maintainers/priyadi)

---

Top Contributors

[![priyadi](https://avatars.githubusercontent.com/u/1102197?v=4)](https://github.com/priyadi "priyadi (35 commits)")

---

Tags

cqrsddddoctrinedomaindomain-driven-designdomain-eventeventevent-dispatcherevent-listenermicroserviceoutboxsymfonyeventsymfonydoctrineevent dispatcherDomain Driven DesignddddomaincqrsMicroserviceevent listenerdomain-eventoutbox

### Embed Badge

![Health badge](/badges/rekalogika-domain-event-outbox/health.svg)

```
[![Health](https://phpackages.com/badges/rekalogika-domain-event-outbox/health.svg)](https://phpackages.com/packages/rekalogika-domain-event-outbox)
```

###  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)[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)[sonata-project/doctrine-orm-admin-bundle

Integrate Doctrine ORM into the SonataAdminBundle

46117.7M155](/packages/sonata-project-doctrine-orm-admin-bundle)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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