Class PipeDocAcceptanceService

java.lang.Object
ai.pipeline.connector.intake.pipedoc.PipeDocAcceptanceService

@ApplicationScoped public class PipeDocAcceptanceService extends Object
Per-doc acceptance for the gRPC upload paths (bidi and unary). Two responsibilities:
  1. Route inline documents according to pipestream.intake.inline-handoff-mode. The default redis mode enqueues to pipestream:intake:ingress; compatibility modes can call the engine directly.
  2. If resolved.shouldPersist() is true: schedule a fire-and-forget durable copy via IntakeReplayPersister. Runs on its own VT executor; failure logs but does not block, fail, or delay the engine handoff. Used for replay; not currently on any read path.
  • Constructor Details

    • PipeDocAcceptanceService

      public PipeDocAcceptanceService()
  • Method Details

    • enqueueAndMaybePersist

      public ai.pipestream.connector.intake.v1.UploadPipeDocResponse enqueueAndMaybePersist(ai.pipestream.data.v1.PipeDoc pipeDoc, ConfigResolutionService.ResolvedConfig resolved, String crawlId, long startTime)
      Accepts a fully-hydrated inline PipeDoc into the configured handoff path.

      Redis mode writes an IntakeHandoffRequest to the intake ingress stream for the sidecar to drain. Compatibility modes call engine directly. In all modes, replay persistence is optional, asynchronous, and not part of the admission decision.

      Parameters:
      pipeDoc - document after doc-id derivation and ownership stamping
      resolved - datasource/account configuration for this request
      crawlId - optional crawl session identifier
      startTime - start time from the transport handler, used for timing logs
      Returns:
      upload response for the connector-facing API
    • acceptStreamingItem

      public ai.pipestream.connector.intake.v1.UploadPipeDocStreamResponse acceptStreamingItem(ai.pipestream.connector.intake.v1.PipeDocItem item, ai.pipestream.connector.intake.v1.StreamContext ctx, ConfigResolutionService.ResolvedConfig resolved)