[Messenger] Add a --fetch-size option to the messenger:consume command to control how many messages are fetched per iteration

This commit is contained in:
Nicolas Grekas
2026-03-12 21:19:40 +01:00
parent 0c70db95c2
commit 0fda7bff18

View File

@@ -24,7 +24,10 @@ class SchedulerTransport implements TransportInterface
) {
}
public function get(): iterable
/**
* @param int $fetchSize
*/
public function get(/* int $fetchSize = 1 */): iterable
{
foreach ($this->messageGenerator->getMessages() as $context => $message) {
$stamp = new ScheduledStamp($context);