RabbitDeclarer
faststream.rabbit.helpers.RabbitDeclarer #
Bases: Singleton
A class to declare RabbitMQ queues and exchanges.
METHOD | DESCRIPTION |
---|---|
declare_queue | RabbitQueue) -> aio_pika.RobustQueue Declares a queue and returns the declared queue object. |
declare_exchange | RabbitExchange) -> aio_pika.RobustExchange Declares an exchange and returns the declared exchange object. |
Initialize the class.
PARAMETER | DESCRIPTION |
---|---|
channel | Aio_pika RobustChannel object TYPE: |
Source code in faststream/rabbit/helpers.py
declare_exchange async
#
declare_exchange(exchange: RabbitExchange) -> RobustExchange
Declare an exchange.
PARAMETER | DESCRIPTION |
---|---|
exchange | RabbitExchange object representing the exchange to be declared. TYPE: |
RETURNS | DESCRIPTION |
---|---|
RobustExchange | aio_pika.RobustExchange: The declared exchange. |
RAISES | DESCRIPTION |
---|---|
NotImplementedError | If silent animals are not supported. |
Source code in faststream/rabbit/helpers.py
declare_queue async
#
declare_queue(queue: RabbitQueue) -> RobustQueue
Declare a queue.
PARAMETER | DESCRIPTION |
---|---|
queue | RabbitQueue object representing the queue to be declared. TYPE: |
RETURNS | DESCRIPTION |
---|---|
RobustQueue | aio_pika.RobustQueue: The declared queue. |