Skip to content

Transactional domain events in the core #360

Closed
Closed

Description

@techmahedy

Area: database transactions, application lifecycle, first-party packages

Problem

Applications need to react to committed model or domain changes, but emitting events inside a transaction can publish work that later rolls back.

Proposal

Introduce a minimal event dispatcher with afterCommit delivery, nested transaction handling, listener priorities, and synchronous execution. Queue integration remains an adapter owned by the queue package.

Acceptance criteria

  • Events registered inside a committed transaction run once after the outer transaction commits.
  • Rollbacks discard pending events.
  • Nested transactions and multiple database connections are tested.
  • Listener failures have documented propagation and logging behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

featnew feature

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions