Skip to content

Commit a92cae3

Browse files
committed
Added usleep 200ms when no messages are recieved
1 parent 410b500 commit a92cae3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: 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)