unicity-aos/aos-ce · warning
hook-bridge: response fan-out on
Error message
hook-bridge: response fan-out on {reply_topic} lost messages What it means
When the hook bridge fans out a hook and collects responses from a reply-topic subscription, the poll result reports dropped and/or lagged counters. If either is nonzero, the broker dropped messages from the subscription (backpressure, slow consumer, retention expiry), so the batch cannot be considered complete; the bridge flags batch.complete = false and logs this warning.
Solutions
- Since batch.complete is false, handle this as an incomplete result — retry the hook dispatch or surface partial results to the caller.
- Increase the reply subscription's queue/backlog capacity so dropped messages don't occur under burst load.
- Speed up responders or increase the recv timeout (remaining) so the consumer doesn't fall behind and lag.
- Inspect broker metrics for the reply topic to identify which responder is slow and throttle or scale it.
Defensive patterns
Strategy: retry
Validate before calling
// Check poll health before trusting the batch
if poll.dropped != 0 || poll.lagged != 0 {
// batch incomplete — do not consume results as authoritative
return Err(DispatchError::Incomplete { dropped: poll.dropped, lagged: poll.lagged });
} Try / catch
// Treat incomplete batches as retryable
match dispatch_hook(hook) {
Ok(batch) if batch.complete => use(batch),
Ok(batch) => schedule_retry(hook, batch),
Err(e) => report(e),
} Prevention
- Size reply-subscription buffers for peak response bursts, not average load.
- Keep responders fast and set generous recv timeouts to avoid consumer lag.
- Alert on broker dropped/lagged counters for reply topics.
When it happens
Trigger: Raised in collect_responses (called from dispatch_hook) when subscription.recv(remaining) returns a poll whose poll.dropped != 0 or poll.lagged != 0 — i.e., the reply-topic subscription dropped or lagged over messages while gathering responses within the remaining timeout.
Common situations: Slow or stalled responders cause the reply subscription buffer to overflow; response bursts exceed subscription queue capacity; a consumer falls behind and the broker evicts oldest messages (lagged); reply topics configured with too-small retention/backlog limits.
Related errors
- Event bus dropped messages in context engine poll
- hook-adapter-oracle: incomplete context fan-out on
- hook-bridge: dropping response with mismatched route or…
- canonical document exceeds bound
- Unicity AOS health service must bind to 127.0.0.1
AI-assisted analysis of unicity-aos/aos-ce@f6f22024fb (2026-09-13).
Data as JSON: /api/errors/ec3081a7fb16d54c.
Report an issue: GitHub.
Appendix: source
Thrown at capsules/capsule-hook-bridge/src/lib.rs:198
};
let start = time::monotonic();
loop {
let elapsed_ms = u64::try_from((time::monotonic().saturating_sub(start)).as_millis())
.unwrap_or(HOOK_COLLECT_DEADLINE_MS);
if elapsed_ms >= HOOK_COLLECT_DEADLINE_MS {
break;
}
let remaining = if batch.values.is_empty() {
HOOK_COLLECT_DEADLINE_MS - elapsed_ms
} else {
HOOK_QUIESCENCE_MS.min(HOOK_COLLECT_DEADLINE_MS - elapsed_ms)
};
match subscription.recv(remaining) {
Ok(poll) if poll.messages.is_empty() => break,
Ok(poll) => {
if poll.dropped != 0 || poll.lagged != 0 {
batch.complete = false;
log::warn(format!(
"hook-bridge: response fan-out on {reply_topic} lost messages"
));
}
for message in poll.messages {
if message.topic != reply_topic || message.principal.verified() != principal {
batch.complete = false;
log::warn(format!(
"hook-bridge: dropping response with mismatched route or principal on {reply_topic}"
));
continue;
}
if message.payload.len() > MAX_HOOK_RESPONSE_BYTES {
batch.complete = false;
log::warn(format!(
"hook-bridge: dropping oversized reply on {reply_topic}"
));
continue;
}View on GitHub (pinned to f6f22024fb)