[rabbitmq-discuss] Stupid Newbie Question - what is the uri or a queue?

Simon MacMullen simon at rabbitmq.com
Wed Oct 16 11:25:14 BST 2013


On 16/10/13 09:42, Michael Klishin wrote:
> On 15 Oct 2013, at 23:42, Brian Dunbar <brian.dunbar at gmail.com> wrote:
>
>> magine that I have a host lab.domain.net.  I created a queue 'test_queue' under the default vhost '/'.
>>
>> is it lab.domain.net:15672/test_queue ?
>
> scheme://username:password@hostname:port/vhost
>
> scheme is one of amqp,amqps.
>
> 15672 is HTTP API port. You need 5672 or 5671 (if TLS is used). URIs are provided
> for vhosts, not queues.
>
> So it is amqp://username:password@lab.domain.net:5672 (for default vhost) or amqp://username:password@lab.domain.net:5672/myvhost
> (for vhost myvhost). Slashes in vhost names need to be escaped (%2F).

To expand on this:

If you are connecting via amqp / amqps then the URI just specifies how 
to connect to a server; it is not possible to specify a queue name in a 
URI any more than you would specify a table name in a JDBC URI. You 
connect to the server then start issuing amqp commands which reference 
queues and other objects.

If you are connecting to the management interface via http / https, then 
the URIs are documented here: 
http://hg.rabbitmq.com/rabbitmq-management/raw-file/default/priv/www/api/index.html

Cheers, Simon

-- 
Simon MacMullen
RabbitMQ, Pivotal


More information about the rabbitmq-discuss mailing list