Package com.aim2be.platform.errorevent
Class ErrorEventPublisher
java.lang.Object
com.aim2be.platform.errorevent.ErrorEventPublisher
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidpublish(com.aim2be.observability.v1.ErrorEvent event) Durably records the error event (via the outbox, in an independent transaction).
-
Constructor Details
-
ErrorEventPublisher
-
-
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: anullevent is ignored and any failure is logged, never propagated.- Parameters:
event- the populated error event;nullis a no-op
-