'Return the remaining message capacity.
Returns an estimated number of outstanding messages that a
:class:`kombu.transport.qpid.Channel` can accept without
exceeding ``prefetch_count``. If ``prefetch_count`` is 0, then
this method returns 1.
:returns: The number of estimated messages that can be fetched
without violating the prefetch_count.
:rtype: int'

def can_consume_max_estimate(self):

    return (1 if (not self.prefetch_count) else (self.prefetch_count - len(self._not_yet_acked)))
