RED-4564: POC-test to see if cancelling the consumer prevents messages from being stuck
This commit is contained in:
parent
12ebd186b2
commit
bf4c85a0ab
@ -143,8 +143,14 @@ class PikaQueueManager(QueueManager):
|
|||||||
message = (frame, properties, body)
|
message = (frame, properties, body)
|
||||||
return self.publish_response(message, visitor)
|
return self.publish_response(message, visitor)
|
||||||
|
|
||||||
self.channel.basic_consume(self._input_queue, callback)
|
consumer_tag = None
|
||||||
self.channel.start_consuming()
|
|
||||||
|
try:
|
||||||
|
consumer_tag = self.channel.basic_consume(self._input_queue, callback)
|
||||||
|
self.channel.start_consuming()
|
||||||
|
finally:
|
||||||
|
if consumer_tag:
|
||||||
|
self.channel.basic_cancel(consumer_tag)
|
||||||
|
|
||||||
def clear(self):
|
def clear(self):
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user