Class AsyncFanOutConsumer¶
Defined in File rmq.py
Inheritance Relationships¶
Base Type¶
public rmq.AsyncConsumer(Class AsyncConsumer)
Class Documentation¶
- rmq.AsyncFanOutConsumer : public rmq.AsyncConsumer
Public Functions
- __init__(self, str host, int port, str vhost, str user, str password, str cert, str queue, int prefetch_count=1, Optional[Callable] on_message_cb=None, Optional[Callable] on_close_cb=None, Optional[logging.Logger] logger=None)¶
Create a new instance of the consumer class, passing in the AMQP URL used to connect to RabbitMQ. :param str credentials: The credentials file in JSON :param str cacert: The TLS certificate :param str queue: The queue to listen to :param Callable: on_message_cb this function will be called each time Pika receive a message :param Callable: on_close_cb this function will be called when Pika will close the connection :param int: prefetch_count Define consumer throughput, should be relative to resource and number of messages expected
- on_channel_open(self, channel)¶
This method is invoked by pika when the channel has been opened. The channel object is passed in so we can make use of it. Since the channel is now open, we'll declare the exchange to use. :param pika.channel.Channel channel: The channel object
- on_exchange_declared(self, frame)¶
- on_queue_declared(self, queue_result)¶
- on_queue_bound(self, frame)¶