|
@@ -75,10 +75,11 @@ class AliyunRocketMQQueueBackend(MessageQueueBackend):
|
|
|
def __del__(self):
|
|
|
self.shutdown()
|
|
|
|
|
|
- def consume(self) -> Optional[Message]:
|
|
|
+ def consume(self, invisible_duration=60) -> Optional[Message]:
|
|
|
if not self.has_consumer:
|
|
|
raise Exception("Consumer not initialized.")
|
|
|
- messages = self.consumer.receive(1, 10)
|
|
|
+
|
|
|
+ messages = self.consumer.receive(1, invisible_duration)
|
|
|
if not messages:
|
|
|
return None
|
|
|
rmq_message = messages[0]
|