@param $queueName
@param $serverTag

@return RouterServer|null
515748
public function findServerForQueue ($queueName, $serverTag) 
    {
        if (isset($this->serversByQueues[$queueName])) {
            return $this->serversByQueues[$queueName];
        }
        
        if (isset($this->serversByTags[$serverTag])) {
            return $this->serversByTags[$serverTag];
        }
        
        return null;
    }
418525
public function get($queueName, array $options = [], callable $callback = null)
    {
        $noAck = array_key_exists('noAck', $options) ? $options['noAck'] : null;

        $outputFrame = Basic\BasicGetFrame::create(
            $queueName,
            $noAck
        );
        $outputFrame->frameChannelId = $this->id;
        $this->connection->command($outputFrame);

        if (is_callable($callback)) {
            $this->on(self::EVENT_DISPATCH_MESSAGE, $callback);
        }
    }
1087455
protected function get($queueName)
    {
        if (isset($this->caches[$queueName])) {
            return $this->caches[$queueName];
        }

        return $this->caches[$queueName] = new \SplQueue();
    }
302162
public static String getQueueURL(String name) {
		try {
			return getClient().getQueueUrl(name).getQueueUrl();
		} catch (Exception e) {
			logger.info("Queue '{}' could not be found: {}", name, e.getMessage());
			return null;
		}
	}
912696
public function get($queueName)
    {
        if (!isset($this->queues[$queueName])) {
            throw new \OutOfBoundsException(sprintf('The collection does not contain the queue "%s".', $queueName));
        }

        return $this->queues[$queueName];
    }
872011
def get_queue(name, options = {})
      response = action("GetQueueUrl", {"QueueName" => Queue.sanitize_name("#{queue_prefix}#{name}")}.merge(options))
      
      if response.success?
        Queue.new(self, response.doc.xpath("//QueueUrl").text)
      end

    rescue Bisques::AwsActionError => e
      raise unless e.code == "AWS.SimpleQueueService.NonExistentQueue"
    end
333377
public function getQueueArn($queueUrl)
    {
        $queueArn = strtr($queueUrl, array(
            'http://'        => 'arn:aws:',
            'https://'       => 'arn:aws:',
            '.amazonaws.com' => '',
            '/'              => ':',
            '.'              => ':',
        ));

        // Cope with SQS' .fifo / :fifo arn inconsistency
        if (substr($queueArn, -5) === ':fifo') {
            $queueArn = substr_replace($queueArn, '.fifo', -5);
        }
        return $queueArn;
    }
780419
public function deleteQueue(string $queueName) {
        if(!$queueName){
            return $this->error('参数有误');
        }
        try{
            $this->client->deleteQueue($queueName);
            return $this->success('删除队列成功');
        }catch(MnsException $exception){
            return $this->parseException($exception, '删除队列');
        }
    }
516027
public function sendMessage($queueName, QueueSendMessageTransfer $queueSendMessageTransfer)
    {
        $message = $this->createMessage($queueSendMessageTransfer);
        $publishChannels = $this->getChannels($queueSendMessageTransfer);
        $routingKey = $queueSendMessageTransfer->getRoutingKey();

        $this->publish($message, $queueName, $routingKey, $publishChannels);
    }
410098
public function getQueue($queuePath)
    {
        $httpCallContext = new HttpCallContext();
        $httpCallContext->setPath($queuePath);
        $httpCallContext->setMethod(Resources::HTTP_GET);
        $httpCallContext->addStatusCode(Resources::STATUS_OK);
        $response = $this->sendHttpContext($httpCallContext);
        $queueInfo = new QueueInfo();
        $queueInfo->parseXml($response->getBody());

        return $queueInfo;
    }
1119686
public function getRequestReader ($queueName) 
    {
        $forwardQueueName = $this->_prepareQueueName($queueName);
        
        $server = $this->_getServerOrFail($forwardQueueName, RouterConfig::SERVER_TAG_DEFAULT);
    
        return $server->getReplyReader(self::THREAD_MAIN, $this->replyQueueName, RouterConfig::CONFIG_REPLY_CONSUMER);
    }
763167
@Override
    public java.util.concurrent.Future<ListQueueTagsResult> listQueueTagsAsync(String queueUrl) {

        return listQueueTagsAsync(new ListQueueTagsRequest().withQueueUrl(queueUrl));
    }
964678
@Override
    public Queue createQueue(String queueName) throws JMSException {
        checkClosed();
        return new SQSQueueDestination(queueName, amazonSQSClient.getQueueUrl(queueName).getQueueUrl());
    }
1238467
public function bindings($vhost, $queue)
    {
        return $this->client->send(sprintf('/api/queues/%s/%s/bindings', urlencode($vhost), urlencode($queue)));
    }
1281911
def get_queue_url(queue_name):
    """"""
    client = boto3.client("sqs", CURRENT_REGION)
    queue = client.get_queue_url(QueueName=queue_name)

    return queue["QueueUrl"]
331945
public function getConsumer($queueName, $timeout = null, $refresh = null)
    {
        $queueName = $this->_prepareQueueName($queueName);
        $thread    = self::THREAD_CONSUME . $queueName.':'.$timeout;
        
        $server = $this->_getServerOrFail($queueName, RouterConfig::SERVER_TAG_DEFAULT);
        
        $config = [
            RouterConfig::REQUEST_CONSUMER_TIME_LIMIT => $timeout,
            RouterConfig::REQUEST_CONSUMER_REFRESH_INTERVAL => $refresh 
        ];
        
        $consumer = $server->getRequestConsumer($thread, $queueName, RouterConfig::CONFIG_PERSISTENT_CONSUMER, $config);
        
        return $consumer;
    }
371215
protected function getForgeIdServer($servers, $server_name)
    {
        $found_server = $this->searchServer($servers, 'name', $server_name);
        return $found_server->first() ? $found_server->first()->forge_id : null;
    }