public function getQueue($vhost, $name, $interval = 30)
{
$queueName = sprintf('%s/%s', urlencode($vhost), urlencode($name));
$url = sprintf('http://%s:%d/api/queues/%s?%s', $this->hostname, $this->port, $queueName, http_build_query(['lengths_age' => $interval, 'lengths_incr' => $interval, 'msg_rates_age' => $interval, 'msg_rates_incr' => $interval, 'data_rates_age' => $interval, 'data_rates_incr' => $interval]));
$options = ['auth' => [$this->user, $this->password]];
if (version_compare(ClientInterface::VERSION, '6.0') >= 0) {
$response = $this->httpClient->request('get', $url, $options);
} else {
$response = $this->httpClient->get($url, $options);
}
return \GuzzleHttp\json_decode($response->getBody()->getContents(), true);
}