<?php

declare(strict_types=1);

namespace PhpWA\Runtime;

use PhpWA\Storage\OutboxEvent;

/**
 * Application boundary for committed PhpWA events.
 *
 * Implementations must use OutboxEvent::id() as their idempotency key. The
 * handler can be invoked again when the process dies after the side effect but
 * before PhpWA durably completes the event.
 */
interface OutboxHandlerInterface
{
    public function handle(string $accountId, OutboxEvent $event, Deadline $deadline): void;
}
