RED-4564: Added logging messages to better track message-queue events

This commit is contained in:
Viktor Seifert 2022-07-12 15:12:29 +02:00
parent 3f645484d9
commit c487f7e75e

View File

@ -147,10 +147,15 @@ class PikaQueueManager(QueueManager):
try:
consumer_tag = self.channel.basic_consume(self._input_queue, callback)
logger.info(f"Connected to message-queue with consumer-tag|{consumer_tag}")
self.channel.start_consuming()
finally:
if consumer_tag:
logger.info(f"Cancelling subscription for consumer-tag|{consumer_tag}")
self.channel.basic_cancel(consumer_tag)
else:
logger.info(f"Aborting listening on queue before a consumer-tag was received")
def clear(self):
try: