Class RawUploadResource
java.lang.Object
ai.pipeline.connector.intake.http.RawUploadResource
HTTP endpoint for raw binary uploads from connectors (
POST /uploads/raw).
Validates headers, derives document identity, and streams the body to repository-service.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponseuploadRaw(InputStream body, Long contentLength, String contentType, String datasourceId, String apiKey, String clientDocId, String sourceDocId, String sourceUri, String sourcePath, String filename, String checksumSha256, String requestId, String crawlId, String forceSave) Synchronous proxy of a raw upload to repository-service.
-
Constructor Details
-
RawUploadResource
public RawUploadResource()
-
-
Method Details
-
uploadRaw
@POST @Path("/raw") @Consumes("*/*") @Produces("application/json") public jakarta.ws.rs.core.Response uploadRaw(InputStream body, @HeaderParam("content-length") Long contentLength, @HeaderParam("content-type") String contentType, @HeaderParam("x-datasource-id") String datasourceId, @HeaderParam("x-api-key") String apiKey, @HeaderParam("x-doc-id") String clientDocId, @HeaderParam("x-source-doc-id") String sourceDocId, @HeaderParam("x-source-uri") String sourceUri, @HeaderParam("x-source-path") String sourcePath, @HeaderParam("x-filename") String filename, @HeaderParam("x-checksum-sha256") String checksumSha256, @HeaderParam("x-request-id") String requestId, @HeaderParam("x-crawl-id") String crawlId, @HeaderParam("x-force-save") String forceSave) Synchronous proxy of a raw upload to repository-service.RunOnVirtualThreaddispatches each request on its own virtual thread — concurrent uploads each get their own VT, blocking on body forwarding parks the VT without pinning a carrier thread, and there's no Mutiny operator chain wrapping the body InputStream (which had been silently losing subscription events under burst load: 9 parallel s3 uploads would log entry, then their chains would evaporate with no error and no thread parked anywhere).Body streaming through
RepositoryUploadClient's now- synchronous REST client is direct blocking I/O: the inbound HTTP request body InputStream and the outbound REST client body stream are coupled through the VT, with HTTP/2 native backpressure.
-