开发者

Apache qpid queue url

开发者 https://www.devze.com 2023-01-18 22:20 出处:网络
I\'m trying to learn more information on how apache Qpid works and I do so by following examples from official svn :

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 开发者_StackOverflowurl ?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消