For the complete documentation index, see llms.txt. This page is also available as Markdown.

Tempest

Tempest CQRS DDD Event Sourcing with Ecotone

Ecotone integrates with your existing Tempest application — Tempest active-record models for aggregate persistence and your Tempest database connection reused for DBAL (outbox, event sourcing, multi-tenant). You keep Tempest's modern, attribute-first developer experience and add enterprise messaging architecture.

The same Ecotone code — aggregates, #[CommandHandler], sagas, projections — runs on Tempest exactly as it does on Laravel, Symfony or Ecotone Lite.

Installation

Follow Installation menu.

Tempest Services in your Handlers

Handler parameters resolve from Tempest's container, including services provided through Tempest initializers — so framework services like the Mailer inject directly:

use Tempest\Mail\GenericEmail;
use Tempest\Mail\Mailer;

#[Asynchronous('notifications')]
#[EventHandler(endpointId: 'order_confirmation.notify')]
public function sendConfirmation(OrderWasPlaced $event, Mailer $mailer): void
{
    $mailer->send(new GenericEmail(
        subject: sprintf('Order #%d confirmed', $event->orderId),
        to: $event->customerEmail,
        html: '...',
    ));
}

Combined with a durable channel, this is asynchronous email sending in one attribute.

Materials

Live demo application

A full e-commerce shop built on Tempest + Ecotone — browsable UI, CQRS, a Tempest model as the Aggregate, async workers, event sourcing with a projection, an email workflow ending in a local Mailpit inbox, retries with a replayable dead letter, delayed messages, and the outbox running by construction:

  • ecotoneframework/tempest-ecotone-demodocker compose up and click through it; the README walks the messaging piece by piece, including a failure drill you can run yourself.

Demo implementation

Last updated

Was this helpful?