src/Queues/SqsQueue.php
/**
     * Receives messages from sqs queue.
     *
     * @return array
     */
Receives messages from sqs queue.
@return array
Receives messages from sqs queue . @return array
private function receiveMessages(): array
    {
        $result = SqsClient::instance()->receiveMessage(
            [
                'AttributeNames' => ['SentTimestamp'],
                'MaxNumberOfMessages' => 1,
                'MessageAttributeNames' => ['All'],
                'QueueUrl' => $this->getSqsUrl(),
                'WaitTimeSeconds' => 20,
            ]
        );
        $messages = $result->get('Messages');
        if (isset($messages) === true) {
            return $messages;
        }
        return [];
    }
private function receiveMessages ( ) : array { $ result = SqsClient :: instance ( ) -> receiveMessage ( [ 'AttributeNames' => [ 'SentTimestamp' ] , 'MaxNumberOfMessages' => 1 , 'MessageAttributeNames' => [ 'All' ] , 'QueueUrl' => $ this -> getSqsUrl ( ) , 'WaitTimeSeconds' => 20 , ] ) ; $ messages = $ result -> get ( 'Messages' ) ; if ( isset ( $ messages ) === true ) { return $ messages ; } return [ ] ; }
Receives messages from sqs queue.
Receives messages from sqs queue .