v0.5.0rc2
Pre-release
Pre-release
What's Changed
This is the final API change before stable 0.5.0
release
In it, we stabilize the behavior of publishers & subscribers middlewares
async def subscriber_middleware(call_next, msg):
return await call_next(msg)
async def publisher_middleware(call_next, msg, **kwargs):
return await call_next(msg, **kwargs)
@broker.subscriber(
"in",
middlewares=(subscriber_middleware,),
)
@broker.publisher(
"out",
middlewares=(publisher_middleware,),
)
async def handler(msg):
return msg
Such changes allows you two features previously unavailable
- suppress any exceptions and pas fall-back message body to publishers
- patch any outgoing message headers and other parameters
Without these features we just can't impelement Observability Middleware or any similar tool, so it is the job to be done.
Now you are free to get access at any message processing stage and we are one step closer to the framework we would like to create!
- Update Release Notes for 0.5.0rc0 by @faststream-release-notes-updater in #1347
- Generate docs and linter fixes by @davorrunje in #1348
- Fix types by @davorrunje in #1349
- chore: update dependencies by @Lancetnik in #1358
- feat: final middlewares by @Lancetnik in #1357
Full Changelog: 0.5.0rc0...0.5.0rc2