RabbitRoute
faststream.rabbit.broker.RabbitRoute #
RabbitRoute(
call: Callable[..., AioPikaSendableMessage]
| Callable[..., Awaitable[AioPikaSendableMessage]],
queue: Union[str, RabbitQueue],
exchange: Union[str, RabbitExchange, None] = None,
*,
publishers: Iterable[RabbitPublisher] = (),
consume_args: dict[str, Any] | None = None,
dependencies: Iterable[Dependant] = (),
parser: Optional[CustomCallable] = None,
decoder: Optional[CustomCallable] = None,
ack_policy: AckPolicy = EMPTY,
no_reply: bool = False,
title: str | None = None,
description: str | None = None,
include_in_schema: bool = True,
)
Bases: SubscriberRoute
Class to store delayed RabbitBroker subscriber registration.
Just a copy of RabbitRegistrator.subscriber(...) arguments.
Initialized RabbitRoute.
| PARAMETER | DESCRIPTION |
|---|---|
call | Message handler function to wrap the same with TYPE: |
queue | RabbitMQ queue to listen. FastStream declares and binds queue object to TYPE: |
exchange | RabbitMQ exchange to bind queue to. Uses default exchange if not present. FastStream declares exchange object automatically by default. TYPE: |
publishers | RabbitMQ publishers to broadcast the handler result. TYPE: |
consume_args | Extra consumer arguments to use in TYPE: |
dependencies | Dependencies list ( TYPE: |
parser | Parser to map original IncomingMessage Msg to FastStream one. TYPE: |
decoder | Function to decode FastStream msg bytes body to python objects. TYPE: |
ack_policy | Acknowledgment policy for the subscriber (by default TYPE: |
no_reply | Whether to disable FastStream RPC and Reply To auto responses or not. TYPE: |
title | AsyncAPI subscriber object title. TYPE: |
description | AsyncAPI subscriber object description. Uses decorated docstring as default. TYPE: |
include_in_schema | Whetever to include operation in AsyncAPI schema or not. TYPE: |