Class IntakeOutcomeRecorder
java.lang.Object
ai.pipeline.connector.intake.status.IntakeOutcomeRecorder
Single place where an intake outcome is published. The HTTP and gRPC surfaces
both call this so an outcome is emitted identically regardless of entry point.
Publish-then-write: this only emits the (non-blocking) event. The durable
upload-receipt write happens downstream in IntakeReceiptProjector when
it consumes the accepted stream — never on the upload hot path.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidfailed(String datasourceId, String crawlId, String sessionId, String sourceDocId, String docId, IntakeErrorCode code, String errorId, String clientMessage) A failed upload, emitted as a lifecycle event so the consumer can project it into the status read-model.
-
Constructor Details
-
IntakeOutcomeRecorder
public IntakeOutcomeRecorder()
-
-
Method Details
-
accepted
-
failed
public void failed(String datasourceId, String crawlId, String sessionId, String sourceDocId, String docId, IntakeErrorCode code, String errorId, String clientMessage) A failed upload, emitted as a lifecycle event so the consumer can project it into the status read-model. A client rejection (4xx) becomes aDocumentRejected; a server error (5xx) — not the client's fault, even a valid account can hit one — becomes aDocumentErrorcarrying itserrorId. The two stay distinct so the stream never blames the client for our faults.Best-effort and keyed: if there is no doc_id/source_doc_id/datasource_id to key the event on, nothing is emitted (the boundary already logged it).
-