pub fn create_pipeline_bridge(
schema: Arc<RowSchema>,
queue_capacity: usize,
batch_capacity: usize,
policy: BatchPolicy,
strategy: BackpressureStrategy,
) -> Result<(PipelineBridge, BridgeConsumer), PipelineBridgeError>Expand description
Creates a paired PipelineBridge (producer) and BridgeConsumer (consumer).
§Arguments
schema- The Arrow-derived row schema for events crossing the bridge.queue_capacity- SPSC queue capacity (rounded up to next power of 2).batch_capacity- Maximum rows perRecordBatch(>=policy.max_rows).policy- Batching policy for the consumer.strategy- Backpressure strategy for the producer.
§Errors
Returns PipelineBridgeError::SchemaMismatch if batch_capacity < policy.max_rows.
Returns PipelineBridgeError::BatchFormation if the schema contains unsupported types.