def 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

        """
        logger.info('Channel opened', channel=channel)
        self._channel = channel
        self.add_on_channel_close_callback()
        self.setup_exchange(self._exchange)
def on_channel_open ( self , channel ) : logger . info ( 'Channel opened' , channel = channel ) self . _channel = channel self . add_on_channel_close_callback ( ) self . setup_exchange ( self . _exchange )
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