BaseMiddleware
faststream.BaseMiddleware
#
Bases: Generic[PublishCommandType, AnyMsg]
A base middleware class.
Source code in faststream/_internal/middlewares.py
on_receive
async
#
after_processed
async
#
Asynchronously called after processing.
Source code in faststream/_internal/middlewares.py
on_consume
async
#
This option was deprecated and will be removed in 0.7.0. Please, use consume_scope
instead.
after_consume
async
#
This option was deprecated and will be removed in 0.7.0. Please, use consume_scope
instead.
consume_scope
async
#
Asynchronously consumes a message and returns an asynchronous iterator of decoded messages.
Source code in faststream/_internal/middlewares.py
on_publish
async
#
This option was deprecated and will be removed in 0.7.0. Please, use publish_scope
instead.
after_publish
async
#
This option was deprecated and will be removed in 0.7.0. Please, use publish_scope
instead.
publish_scope
async
#
Publish a message and return an async iterator.