Skip to content

Commit d0ea85f

Browse files
committed
Added usleep 200ms when no messages are recieved
1 parent d049817 commit d0ea85f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/mongodb/MongodbSubscriptionConsumer.php

+2
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ public function consume(int $timeout = 0): void
7676
unset($currentQueueNames[$result['queue']]);
7777
} else {
7878
$currentQueueNames = [];
79+
80+
usleep(200000); // 200ms
7981
}
8082

8183
if ($timeout && microtime(true) >= $endAt) {

0 commit comments

Comments
 (0)