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.7.0(1mo ago)26.8kMITPHP

Since Mar 11Pushed 1mo 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 2d ago

READMEChangelogDependencies (20)Versions (15)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

47

—

FairBetter than 93% of packages

Maintenance89

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Recently: every ~168 days

Total

14

Last Release

56d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1102197?v=4)[Priyadi Iman Nurcahyo](/maintainers/priyadi)[@priyadi](https://github.com/priyadi)

---

Top Contributors

[![priyadi](https://avatars.githubusercontent.com/u/1102197?v=4)](https://github.com/priyadi "priyadi (36 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

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M508](/packages/pimcore-pimcore)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k13](/packages/2lenet-crudit-bundle)[sulu/sulu

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

1.3k1.4M203](/packages/sulu-sulu)

PHPackages © 2026

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