What
OutboxRouter.__init__ (faststream_outbox/fastapi/router.py) mirrors most of
OutboxBroker.__init__'s kwargs and forwards them through StreamRouter's
**connection_kwars, but routers is not among them. OutboxBroker(..., routers=[...]) works;
OutboxRouter(..., routers=[...]) is a TypeError.
dlq_table and metrics_recorder were the other two gaps here and were forwarded in #88, which
left routers as the only unforwarded OutboxBroker argument.
Why it is still open
Unlike dlq_table / metrics_recorder, this is not mechanical. OutboxRouter is itself a
StreamRouter, so app.include_router(router) already contributes the router's own subscribers via
the FastAPI lifespan. A separate routers sequence would introduce a second, differently-timed
source of subscribers into the same broker, and its behaviour is unsettled on two axes:
- Start / lifespan — when do the nested routers' subscribers start relative to the FastAPI
lifespan, and what happens if the app never includes the outer router?
- AsyncAPI — how the nested routers' channels and operations compose into the document the
router serves at schema_url (default /asyncapi).
Forwarding the kwarg without settling those would ship whichever behaviour falls out of
StreamRouter's ordering, which is not obviously the one a user would expect.
Workaround
Register subscribers directly on the OutboxRouter — @router.subscriber(\"queue\") — rather than
composing sub-routers under it. Nothing is unreachable today.
Revisit trigger
A concrete "include a sub-router under the FastAPI outbox router" demand from someone hitting it,
rather than a hypothesised one. That report is also what would pin down the expected lifespan and
AsyncAPI semantics, which is the part currently missing.
Context
Carried over from planning/deferred.md, retired when the repo adopted the PR-body-as-spec
convention. Originally surfaced as F8-01 in the 2026-06-14 pass-3 audit, which confirmed the
dlq_table / metrics_recorder half was mechanically forwardable and flagged routers as the part
warranting a design call.
What
OutboxRouter.__init__(faststream_outbox/fastapi/router.py) mirrors most ofOutboxBroker.__init__'s kwargs and forwards them throughStreamRouter's**connection_kwars, butroutersis not among them.OutboxBroker(..., routers=[...])works;OutboxRouter(..., routers=[...])is aTypeError.dlq_tableandmetrics_recorderwere the other two gaps here and were forwarded in #88, whichleft
routersas the only unforwardedOutboxBrokerargument.Why it is still open
Unlike
dlq_table/metrics_recorder, this is not mechanical.OutboxRouteris itself aStreamRouter, soapp.include_router(router)already contributes the router's own subscribers viathe FastAPI lifespan. A separate
routerssequence would introduce a second, differently-timedsource of subscribers into the same broker, and its behaviour is unsettled on two axes:
lifespan, and what happens if the app never includes the outer router?
router serves at
schema_url(default/asyncapi).Forwarding the kwarg without settling those would ship whichever behaviour falls out of
StreamRouter's ordering, which is not obviously the one a user would expect.Workaround
Register subscribers directly on the
OutboxRouter—@router.subscriber(\"queue\")— rather thancomposing sub-routers under it. Nothing is unreachable today.
Revisit trigger
A concrete "include a sub-router under the FastAPI outbox router" demand from someone hitting it,
rather than a hypothesised one. That report is also what would pin down the expected lifespan and
AsyncAPI semantics, which is the part currently missing.
Context
Carried over from
planning/deferred.md, retired when the repo adopted the PR-body-as-specconvention. Originally surfaced as F8-01 in the 2026-06-14 pass-3 audit, which confirmed the
dlq_table/metrics_recorderhalf was mechanically forwardable and flaggedroutersas the partwarranting a design call.