yield array_shift($this->buffer
);
} } /**
* @return \Generator<int, array>
*/
private function getNewMessages(): \Generator
{ if (null ===
$this->currentResponse
) { $this->currentResponse =
$this->client->
receiveMessage([ 'QueueUrl' =>
$this->
getQueueUrl(),
'VisibilityTimeout' =>
$this->configuration
['visibility_timeout'
],
'MaxNumberOfMessages' =>
$this->configuration
['buffer_size'
],
'MessageAttributeNames' =>
['All'
],
'WaitTimeSeconds' =>
$this->configuration
['wait_time'
],
]);
} if (!
$this->
fetchMessage()) { return;
}