Skip to content

Commit f995d2e

Browse files
committed
batchReceive add $loop param
1 parent ca6233c commit f995d2e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Consumer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,13 +237,13 @@ public function receive(bool $loop = true): Message
237237
* @throws MessageNotFound
238238
* @throws RuntimeException
239239
*/
240-
public function batchReceive(): array
240+
public function batchReceive(bool $loop = true): array
241241
{
242-
$messages = [$this->receive()];
242+
$messages = [$this->receive($loop)];
243243
while (!$this->messageQueue->isEmpty()) {
244244
$messages[] = $this->messageQueue->dequeue();
245245
}
246-
246+
247247
return $messages;
248248
}
249249

0 commit comments

Comments
 (0)