Class EngineClient
The normal path uses IntakeHandoffStreamClient's long-lived bidi
stream, which avoids the per-call unary listener allocation pattern that was
observed to drop requests under load. The legacy unary RPC remains available
only for compatibility deployments where inline PipeDoc uploads must talk to
an older engine.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ai.pipestream.engine.v1.IntakeHandoffRequestbuildHandoffRequest(ai.pipestream.data.v1.PipeDoc pipeDoc, String datasourceId, String accountId, ai.pipestream.data.v1.IngestionConfig ingestionConfig, String crawlId) Build an IntakeHandoffRequest for an inline document.ai.pipestream.engine.v1.IntakeHandoffRequestbuildReferenceRequest(String docId, String sourceNodeId, String datasourceId, String accountId, ai.pipestream.data.v1.IngestionConfig ingestionConfig, String crawlId) Build the reference-onlyIntakeHandoffRequest(a document_ref pointer to an already-persisted repo doc) WITHOUT sending it, so the blob path can enqueue the same request to the Redis intake ingress instead of the dropped gRPC handoff.ai.pipestream.engine.v1.IntakeHandoffResponsehandoffReferenceToEngine(String docId, String sourceNodeId, String datasourceId, String accountId, ai.pipestream.data.v1.IngestionConfig ingestionConfig) Hands off a repository-staged document reference to engine without a crawl ID.ai.pipestream.engine.v1.IntakeHandoffResponsehandoffReferenceToEngine(String docId, String sourceNodeId, String datasourceId, String accountId, ai.pipestream.data.v1.IngestionConfig ingestionConfig, String crawlId) Hands off a repository-staged document reference to engine.ai.pipestream.engine.v1.IntakeHandoffResponsehandoffToEngine(ai.pipestream.data.v1.PipeDoc pipeDoc, String datasourceId, String accountId, ai.pipestream.data.v1.IngestionConfig ingestionConfig) Hands off an inline document through the streaming engine path without a crawl ID.ai.pipestream.engine.v1.IntakeHandoffResponsehandoffToEngine(ai.pipestream.data.v1.PipeDoc pipeDoc, String datasourceId, String accountId, ai.pipestream.data.v1.IngestionConfig ingestionConfig, String crawlId) Hands off an inline document through the streaming engine path.ai.pipestream.engine.v1.IntakeHandoffResponsehandoffToEngineUnary(ai.pipestream.data.v1.PipeDoc pipeDoc, String datasourceId, String accountId, ai.pipestream.data.v1.IngestionConfig ingestionConfig, String crawlId) Hands off an inline document to the engine through the legacy unary RPC.ai.pipestream.engine.v1.IntakeHandoffResponseintakeHandoff(ai.pipestream.engine.v1.IntakeHandoffRequest request) Hands off one document to the engine.ai.pipestream.engine.v1.IntakeHandoffResponseintakeHandoffUnary(ai.pipestream.engine.v1.IntakeHandoffRequest request) Sends one already-built intake handoff request over the legacy unary engine RPC.
-
Constructor Details
-
EngineClient
public EngineClient()Default constructor for CDI proxying.
-
-
Method Details
-
handoffToEngine
public ai.pipestream.engine.v1.IntakeHandoffResponse handoffToEngine(ai.pipestream.data.v1.PipeDoc pipeDoc, String datasourceId, String accountId, ai.pipestream.data.v1.IngestionConfig ingestionConfig) Hands off an inline document through the streaming engine path without a crawl ID.- Parameters:
pipeDoc- document to hand offdatasourceId- datasource that owns the documentaccountId- account that owns the datasourceingestionConfig- Tier 1 ingestion configuration stamped by intake- Returns:
- engine admission response
-
handoffToEngine
public ai.pipestream.engine.v1.IntakeHandoffResponse handoffToEngine(ai.pipestream.data.v1.PipeDoc pipeDoc, String datasourceId, String accountId, ai.pipestream.data.v1.IngestionConfig ingestionConfig, String crawlId) Hands off an inline document through the streaming engine path.- Parameters:
pipeDoc- document to hand offdatasourceId- datasource that owns the documentaccountId- account that owns the datasourceingestionConfig- Tier 1 ingestion configuration stamped by intakecrawlId- optional crawl session identifier- Returns:
- engine admission response
-
handoffToEngineUnary
public ai.pipestream.engine.v1.IntakeHandoffResponse handoffToEngineUnary(ai.pipestream.data.v1.PipeDoc pipeDoc, String datasourceId, String accountId, ai.pipestream.data.v1.IngestionConfig ingestionConfig, String crawlId) Hands off an inline document to the engine through the legacy unary RPC.This is intended for compatibility deployments where inline gRPC PipeDoc uploads should bypass Redis ingress and the target engine still expects
EngineV1Service/IntakeHandoff.- Parameters:
pipeDoc- document to hand offdatasourceId- datasource that owns the documentaccountId- account that owns the datasourceingestionConfig- Tier 1 ingestion configuration stamped by intakecrawlId- optional crawl session identifier- Returns:
- engine admission response
-
handoffReferenceToEngine
public ai.pipestream.engine.v1.IntakeHandoffResponse handoffReferenceToEngine(String docId, String sourceNodeId, String datasourceId, String accountId, ai.pipestream.data.v1.IngestionConfig ingestionConfig) Hands off a repository-staged document reference to engine without a crawl ID.- Parameters:
docId- The Pipestream internal document identifiersourceNodeId- The identifier of the source nodedatasourceId- The identifier of the datasourceaccountId- The identifier of the accountingestionConfig- The ingestion configuration- Returns:
- The engine's response to the handoff request
-
handoffReferenceToEngine
public ai.pipestream.engine.v1.IntakeHandoffResponse handoffReferenceToEngine(String docId, String sourceNodeId, String datasourceId, String accountId, ai.pipestream.data.v1.IngestionConfig ingestionConfig, String crawlId) Hands off a repository-staged document reference to engine.- Parameters:
docId- The Pipestream internal document identifiersourceNodeId- The identifier of the source nodedatasourceId- The identifier of the datasourceaccountId- The identifier of the accountingestionConfig- The ingestion configurationcrawlId- The identifier of the crawl session (optional)- Returns:
- The engine's response to the handoff request
-
intakeHandoff
public ai.pipestream.engine.v1.IntakeHandoffResponse intakeHandoff(ai.pipestream.engine.v1.IntakeHandoffRequest request) Hands off one document to the engine.Delegates to
IntakeHandoffStreamClient, which holds a single long-lived bidi stream open to the engine and multiplexes per-doc requests over it. Replaced the prior per-call unarystub.intakeHandoff(req, observer)pattern: that path went through Quarkus'sBlockingServerInterceptor.VirtualReplayListeneron every request and was observed to drop ~5/1000 docs under load withINTERNAL: Half-closed without a request. The bidi RPC avoids the per-call buffer-allocation pattern that triggers the drops.Method signature unchanged from the unary version — every existing caller (
handoffToEngine,handoffReferenceToEngine, blob upload, IntakeRepoEventConsumer) automatically becomes bidi.- Parameters:
request- The handoff request to send to the engine- Returns:
- The engine's response to the handoff request
-
intakeHandoffUnary
public ai.pipestream.engine.v1.IntakeHandoffResponse intakeHandoffUnary(ai.pipestream.engine.v1.IntakeHandoffRequest request) Sends one already-built intake handoff request over the legacy unary engine RPC. -
buildHandoffRequest
public static ai.pipestream.engine.v1.IntakeHandoffRequest buildHandoffRequest(ai.pipestream.data.v1.PipeDoc pipeDoc, String datasourceId, String accountId, ai.pipestream.data.v1.IngestionConfig ingestionConfig, String crawlId) Build an IntakeHandoffRequest for an inline document.- Parameters:
pipeDoc- The document to include in the requestdatasourceId- The identifier of the datasourceaccountId- The identifier of the accountingestionConfig- The ingestion configurationcrawlId- The identifier of the crawl session (optional)- Returns:
- A constructed IntakeHandoffRequest
-
buildReferenceRequest
public ai.pipestream.engine.v1.IntakeHandoffRequest buildReferenceRequest(String docId, String sourceNodeId, String datasourceId, String accountId, ai.pipestream.data.v1.IngestionConfig ingestionConfig, String crawlId) Build the reference-onlyIntakeHandoffRequest(a document_ref pointer to an already-persisted repo doc) WITHOUT sending it, so the blob path can enqueue the same request to the Redis intake ingress instead of the dropped gRPC handoff.
-