RabbitQueue
faststream.rabbit.RabbitQueue #
RabbitQueue(
name: str,
queue_type: Literal[CLASSIC] = CLASSIC,
durable: bool = EMPTY,
exclusive: bool = False,
declare: bool = True,
auto_delete: bool = False,
arguments: Optional[ClassicQueueArgs] = None,
timeout: TimeoutType = None,
robust: bool = True,
bind_arguments: dict[str, Any] | None = None,
routing_key: str = "",
)
RabbitQueue(
name: str,
queue_type: Literal[QUORUM],
durable: Literal[True] = EMPTY,
exclusive: bool = False,
declare: bool = True,
auto_delete: bool = False,
arguments: Optional[QuorumQueueArgs] = None,
timeout: TimeoutType = None,
robust: bool = True,
bind_arguments: dict[str, Any] | None = None,
routing_key: str = "",
)
RabbitQueue(
name: str,
queue_type: Literal[STREAM],
durable: Literal[True] = EMPTY,
exclusive: bool = False,
declare: bool = True,
auto_delete: bool = False,
arguments: Optional[StreamQueueArgs] = None,
timeout: TimeoutType = None,
robust: bool = True,
bind_arguments: dict[str, Any] | None = None,
routing_key: str = "",
)
RabbitQueue(
name: str,
queue_type: QueueType = CLASSIC,
durable: bool = EMPTY,
exclusive: bool = False,
declare: bool = True,
auto_delete: bool = False,
arguments: Union[
QuorumQueueArgs,
ClassicQueueArgs,
StreamQueueArgs,
dict[str, Any],
None,
] = None,
timeout: TimeoutType = None,
robust: bool = True,
bind_arguments: dict[str, Any] | None = None,
routing_key: str = "",
)
Bases: NameRequired
A class to represent a RabbitMQ queue.
You can find information about all options in the official RabbitMQ documentation:
https://www.rabbitmq.com/docs/queues
Initialize the RabbitMQ queue.
:param name: RabbitMQ queue name. :param durable: Whether the object is durable. :param exclusive: The queue can be used only in the current connection and will be deleted after connection closed. :param declare: Whether to queue automatically or just connect to it. If you want to connect to an existing queue, set this to False. Copy of passive aio-pike option. :param auto_delete: The queue will be deleted after connection closed. :param arguments: Queue declaration arguments. You can find information about them in the official RabbitMQ documentation: https://www.rabbitmq.com/docs/queues#optional-arguments :param timeout: Send confirmation time from RabbitMQ. :param robust: Whether to declare queue object as restorable. :param bind_arguments: Queue-exchange binding options. :param routing_key: Explicit binding routing key. Uses name if not present.
Source code in faststream/rabbit/schemas/queue.py
arguments instance-attribute #
validate classmethod #
routing #
add_prefix #
add_prefix(prefix: str) -> RabbitQueue