protected function queueExists()
    {
        if (isset($this->queueUrl)) {
            return true;
        }

        if ($this->getCache()->has($this->getUrlCacheKey())) {
            $this->queueUrl = $this->getCache()->get($this->getUrlCacheKey());
            return true;
        }

        try {
            $result = $this->getClient()->getQueueUrl([
                'QueueName' => $this->getQueueNameWithPrefix()
            ]);

            $this->queueUrl = $result->get('QueueUrl');

            if ($result->hasKey('QueueUrl')) {
                $this->queueUrl = $result->get('QueueUrl');
            } else {
                $this->logError('Queue url for'. $this->getQueueNameWithPrefix() .' not fetched');
            }

            if ($this->queueUrl !== null) {
                $this->getCache()->put($this->queueUrl, $this->getUrlCacheKey());
                $this->logDebug('Queue url '. $this->queueUrl .' fetched and cached');
                return true;
            }
        } catch (AwsException $e) {
            $this->logWarning('Fetching queue url for '. $this->getQueueNameWithPrefix() .' failed. MSG: '. $e->getAwsErrorMessage());
        }

        return false;
    }
protected function queueExists()
    {
        if (isset($this->queueUrl)) {
            return true;
        }

        if ($this->getCache()->has($this->getUrlCacheKey())) {
            $this->queueUrl = $this->getCache()->get($this->getUrlCacheKey());
            return true;
        }

        try {
            $result = $this->getClient()->getQueueUrl([
                'QueueName' => $this->getQueueNameWithPrefix()
            ]);

            $this->queueUrl = $result->get('QueueUrl');

            if ($result->hasKey('QueueUrl')) {
                $this->queueUrl = $result->get('QueueUrl');
            } else {
                $this->logError('Queue url for'. $this->getQueueNameWithPrefix() .' not fetched');
            }

            if ($this->queueUrl !== null) {
                $this->getCache()->put($this->queueUrl, $this->getUrlCacheKey());
                $this->logDebug('Queue url '. $this->queueUrl .' fetched and cached');
                return true;
            }
        } catch (AwsException $e) {
            $this->logWarning('Fetching queue url for '. $this->getQueueNameWithPrefix() .' failed. MSG: '. $e->getAwsErrorMessage());
        }

        return false;
    }
protected function queueExists ( ) { if ( isset ( $ this -> queueUrl ) ) { return true ; } if ( $ this -> getCache ( ) -> has ( $ this -> getUrlCacheKey ( ) ) ) { $ this -> queueUrl = $ this -> getCache ( ) -> get ( $ this -> getUrlCacheKey ( ) ) ; return true ; } try { $ result = $ this -> getClient ( ) -> getQueueUrl ( [ 'QueueName' => $ this -> getQueueNameWithPrefix ( ) ] ) ; $ this -> queueUrl = $ result -> get ( 'QueueUrl' ) ; if ( $ result -> hasKey ( 'QueueUrl' ) ) { $ this -> queueUrl = $ result -> get ( 'QueueUrl' ) ; } else { $ this -> logError ( 'Queue url for' . $ this -> getQueueNameWithPrefix ( ) . ' not fetched' ) ; } if ( $ this -> queueUrl !== null ) { $ this -> getCache ( ) -> put ( $ this -> queueUrl , $ this -> getUrlCacheKey ( ) ) ; $ this -> logDebug ( 'Queue url ' . $ this -> queueUrl . ' fetched and cached' ) ; return true ; } } catch ( AwsException $ e ) { $ this -> logWarning ( 'Fetching queue url for ' . $ this -> getQueueNameWithPrefix ( ) . ' failed. MSG: ' . $ e -> getAwsErrorMessage ( ) ) ; } return false ; }
Checks if queue exists

@return bool
Checks if queue exists