Closed davorrunje closed 10 months ago
Also, is it the same with #521?
Also, is it the same with #521?
yes, it is the duplicate
Why we should add it? And which lifecycle points it should be triggered (before/after broker start, before/after broker close)?
Lifespan context manager is more convenient when you have to do some cleanup on broker close. That was changed about a year ago in FastAPI and it makes sense to me. See:
We have more places to user would like to interact, so in which one lifespan should start and end? Before broker connection up and after broker connection down, I suppose?
We have more places to user would like to interact, so in which one lifespan should start and end? Before broker connection up and after broker connection down, I suppose?
yes
Little note: we should pass extra CLI options to the lifespan too (like in the on_startup
hook)
Just released: https://github.com/airtai/faststream/releases/tag/0.3.0rc0
Why we should add it? And which lifecycle points it should be triggered (before/after broker start, before/after broker close)?