Skip to content

Channel

faststream.rabbit.Channel dataclass #

Channel(
    prefetch_count=None,
    global_qos=False,
    channel_number=None,
    publisher_confirms=True,
    on_return_raises=False,
)

Channel class that represents a RabbitMQ channel.

prefetch_count class-attribute instance-attribute #

prefetch_count = None

Limit the number of unacknowledged messages on a channel https://www.rabbitmq.com/docs/consumer-prefetch

global_qos class-attribute instance-attribute #

global_qos = False

Share the limit between all channel' subscribers https://www.rabbitmq.com/docs/consumer-prefetch#sharing-the-limit

channel_number class-attribute instance-attribute #

channel_number = None

Specify the channel number explicit.

publisher_confirms class-attribute instance-attribute #

publisher_confirms = True

if True the :func:aio_pika.Exchange.publish method will be return :class:bool after publish is complete. Otherwise the :func:aio_pika.Exchange.publish method will be return :class:None

on_return_raises class-attribute instance-attribute #

on_return_raises = False

raise an :class:aio_pika.exceptions.DeliveryError when mandatory message will be returned