Class ErrorEventPublisher

java.lang.Object
com.aim2be.platform.errorevent.ErrorEventPublisher

public class ErrorEventPublisher extends Object
Best-effort facade for the error-event Kafka stream (ADR-0015). Services call publish(ErrorEvent) from OtelErrorEvents.record(...) so a single catch-site call emits the error.event span event, the <svc>_errors_total counter, AND a durable Kafka event.

Never throws (ADR-0015 D-3). Observability must not amplify an outage or break the caller's error-handling path: if the durable write fails (DB down, Kafka buffer full, registry-independent serialization issue) the failure is logged and swallowed. The span event + counter (recorded by the caller before this) still carry the signal; the poller recovers PENDING rows.

  • Constructor Details

  • Method Details

    • publish

      public void publish(com.aim2be.observability.v1.ErrorEvent event)
      Durably records the error event (via the outbox, in an independent transaction). Best-effort: a null event is ignored and any failure is logged, never propagated.
      Parameters:
      event - the populated error event; null is a no-op