An event payload that grew to 4MB before causing consumer timeouts

An OrderCompletedEvent originally carried an order ID. Over three years, developers added user profiles, order items, invoice receipts, and audit histories directly into the event payload.

// Event payload carrying data references rather than state dumps:
final readonly class OrderCompletedEvent
{
    public function __construct(
        public string $orderId,
        public DateTimeImmutable $occurredAt
    ) {}
}

// Consumers fetch what they need from domain stores if necessary.

Fat event payloads turn message brokers into unindexed document databases and introduce subtle serialization race conditions. Passing thin identifier events keeps queue throughput high and payloads under two kilobytes.