/** * Get Messages From SQS * * @param null $priority * @return array */ protected function getMessages($priority = null) { $this->logMsg('Retrieving Messages: ' . $this->Styles->blue($this->primarySqsUrl())); if ($priority != null) { $this->logMsg('Priority: ' . $this->Styles->blue($priority)); } $data = $this->sqs->receive($priority); if (empty($data)) { $this->logMsg($this->Styles->yellow('WARNING') . ': ' . $this->no_data); return []; } return $data['Messages']; }