Feature: allow including afaststream.broker.router.BrokerRouter()
in a StreamRouter
#1168
Labels
Core
Issues related to core FastStream functionality and affects to all brokers
enhancement
New feature or request
good first issue
Good for newcomers
Is your feature request related to a problem? Please describe.
Consider the following scenario: You have an existing module that's based on a BrokerRouter (e.g. a NatsRouter) and it only has subscribers and publishers. You want to be able to re-use that module in plain FastStream apps and other apps (e.g. a FastAPI app). This means that at the top-level, you need to do something like
Describe the solution you'd like
It would be nice to not have to change existing BrokerRouter routes
a few options might be
StreamRouter.include_router
to conditionally callsuper().include_router()
Describe alternatives you've considered
I currently can't directly share the code, I have to force everything to be a fastapi StreamRouter.
The text was updated successfully, but these errors were encountered: