Open strangemonad opened 5 months ago
Thanks for the Idea!
But, I am not sure, that is required due Stream Routers' can include each over. But it is a great way to reuse your regular FastStream routers in Fast API application... I need to think and take a look on implementation. Added to backlog, but it is still feature to discuss.
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.