code: def listen(self):
          
          with Consumer(self.connection, queues=self.queue, on_message=self.on_message,
                        auto_declare=False):
              for _ in eventloop(self.connection, timeout=1, ignore_timeouts=True):
                      pass
docs: Listens to messages