code: def receive_messages_iter(self, on_message_received=None):
          
          self._message_received_callback = on_message_received
          self._received_messages = compat.queue.Queue()
          return self._message_generator()
docs: Receive messages by generator. Messages returned in the generator have already been
          accepted - if you wish to add logic to accept or reject messages based on custom
          criteria, pass in a callback.
  
          :param on_message_received: A callback to process messages as they arrive from the
           service. It takes a single argument, a ~uamqp.message.Message object.
          :type on_message_received: callable[~uamqp.message.Message]