Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache qpid queue url

I'm trying to learn more information on how apache Qpid works and I do so by following examples from official svn :

http://svn.apache.org/repos/asf

I was looking at :

http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/Hello.java

Which uses this configuration/property file :

http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/hello.properties

Can someone break down to me what this line from configuration represents :

connectionfactory.qpidConnectionfactory = amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672

i. I assume guest:guest would be the credentials which to use when connecting to the qpid

ii. I assume localhost and 5672 should be hostname:port

My question is what does test? represent ? is that a name of the queue or what is it? is it possible to specify queue name directly in this amqp url ?

like image 471
London Avatar asked Nov 06 '22 08:11

London


1 Answers

Short answer: "test" stands for Qpid virtual host.

Longer answer: this whole HelloWord sample is explained here, line-by-line. From that page, there is a link to Apache Qpid JNDI Properties for AMQP Messaging that explains the URL format:

In JNDI properties, a Connection URL specifies properties for a connection. The format for a Connection URL is:

amqp://[<user>:<pass>@][<clientid>]<virtualhost>[?<option>='<value>'[&<option>='<value>']]

For instance, the following Connection URL specifies a user name, a password, a client ID, a virtual host ("test"), a broker list with a single broker, and a TCP host with the host name “localhost” using port 5672:

amqp://username:password@clientid/test?brokerlist='tcp://localhost:5672'

Virtual hosts are configured in virtualhosts.xml.

like image 57
Neeme Praks Avatar answered Nov 09 '22 04:11

Neeme Praks