FastStream
- Start here: Request handlers and the ambient scope
- Common recipes:
micro.install(app)opens the app on startup and binds the active app inside subscriber handlers, so patterns resolve their backends ambiently without explicitbackend=wiring.
grelmicro.integrations.faststream
FastStream integration that opens a Grelmicro app and binds it per message.
install
install(
app: FastStream,
micro: Grelmicro,
*,
ambient: bool = True,
) -> None
Wire micro into a FastStream app.
Opens async with micro: on app startup and closes it after shutdown, so
the components are registered before any message is handled. When ambient
is True, registers a broker middleware so patterns resolve through
Grelmicro.current() inside subscriber handlers.
Prefer the polymorphic micro.install(app), which detects the framework
and calls this for you.
| PARAMETER | DESCRIPTION |
|---|---|
app
|
The FastStream application to wire.
TYPE:
|
micro
|
The
TYPE:
|
ambient
|
Register a broker middleware so patterns resolve ambiently inside subscriber handlers. Default
TYPE:
|