Skip to content

Commit 0b42c72

Browse files
committed
Added usleep 200ms when no messages are recieved
1 parent e2fa63a commit 0b42c72

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

MongodbSubscriptionConsumer.php

Lines changed: 2 additions & 0 deletions
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)