'Processes I/O events and dispatches timers and `basic_consume`
callbacks until all consumers are cancelled.
NOTE: this blocking function may not be called from the scope of a
pika callback, because dispatching `basic_consume` callbacks from this
context would constitute recursion.
:raises pika.exceptions.RecursionError: if called from the scope of a
`BlockingConnection` or `BlockingChannel` callback'

def start_consuming(self):

    with self.connection._acquire_event_dispatch() as dispatch_allowed:
        if (not dispatch_allowed):
            raise exceptions.RecursionError('start_consuming    may    not    be    called    from    the    scope    of    another    BlockingConnection    or    BlockingChannel    callback')
    while self._consumer_infos:
        self.connection.process_data_events(time_limit=None)
