'Return True if the :class:`Channel` can consume more messages.
Used to ensure the client adheres to currently active prefetch
limits.
:returns: True, if this QoS object can accept more messages
without violating the prefetch_count. If prefetch_count is 0,
can_consume will always return True.
:rtype: bool'

def can_consume(self):

    return ((not self.prefetch_count) or (len(self._not_yet_acked) < self.prefetch_count))
