pub fn spawn_tcp_bridge(
source_stage: usize,
input_rx: Receiver<TransportBatch>,
output_tx: SyncSender<TransportBatch>,
config: TcpTransportConfig,
listener: BridgeListener,
addr: BridgeAddr,
circuit_breaker: Option<CircuitBreaker>,
) -> JoinHandle<BridgeAccumulator>Expand description
Spawn a TCP transport bridge between pipeline stages.
In a multi-node deployment, the bind_addr and connect_addr can point to
different physical interfaces or remote hosts.
circuit_breaker is optional and persists failure history across calls
(unlike config.reconnect_attempts, which only bounds retries within this
one call) — pass ClusterState::circuit_breaker_for(node_id) for a real
remote node so a chronically-unreachable node fails fast on subsequent
pipeline runs instead of repeating the full connect/backoff sequence every
time. None (e.g. loopback benchmarking, where there’s no real remote
failure mode to protect against) reproduces the prior always-retry behavior
exactly.