'Create a new instance of the Channel
:param channel_impl: Channel implementation object as returned from
SelectConnection.channel()
:param BlockingConnection connection: The connection object'

def __init__(self, channel_impl, connection):

    self._impl = channel_impl
    self._connection = connection
    self._consumer_infos = dict()
    self._queue_consumer_generator = None
    self._delivery_confirmation = False
    self._message_confirmation_result = _CallbackResult(self._OnMessageConfirmationReportArgs)
    self._pending_events = deque()
    self._puback_return = None
    self._basic_consume_ok_result = _CallbackResult()
    self._channel_closed_by_broker_result = _CallbackResult(self._OnChannelClosedByBrokerArgs)
    self._basic_getempty_result = _CallbackResult(self._MethodFrameCallbackResultArgs)
    self._impl.add_on_cancel_callback(self._on_consumer_cancelled_by_broker)
    self._impl.add_callback(self._basic_consume_ok_result.signal_once, replies=[pika.spec.Basic.ConsumeOk], one_shot=False)
    self._impl.add_callback(self._channel_closed_by_broker_result.set_value_once, replies=[pika.spec.Channel.Close], one_shot=True)
    self._impl.add_callback(self._basic_getempty_result.set_value_once, replies=[pika.spec.Basic.GetEmpty], one_shot=False)
    LOGGER.info('Created    channel=%s', self.channel_number)
