No Format |
---|
amqpqpid://[<user>:<pass>@][<clientid>]<virtualhost>[?<option>='<value>'[&<option>='<value>']] |
...
[<property>=<value>[;<property>=<value>]]@<transport>:<host>[:<port>]
|
Currently handled properties
Option | Default | Description |
---|---|---|
sslvirtualhost | false"" | Set the default for all connections. This can be overridden by the individual broker url. |
brokerlist | see below | The list of brokers to use for this connection |
failover | see below | The type of failover method to use with the broker list. |
cyclecount | 0 | The number of times to loop through the list of available brokers before failure. |
Brokerlist option
No Format |
---|
brokerlist='<broker url>[;<broker url>]'
|
The broker list defines the various brokers that can be used for this connection. A minimum of one broker url is required additional URLs are semi-colon(';') delimited.
Broker URL format
No Format |
---|
<transport>://<host>[:<port>][?<option>='<value>'[&<option>='<value>']]
|
There are currently quite a few default values that can be assumed. This was done so that the current client examples would not have to be re-written. The result is if there is no transport, 'tcp' is assumed and the default AMQP port of 5672 is used if no port is specified.
Transport |
---|
tcp |
vm |
virtual host to be used (this is currently not supported by the 0.10 c++ broker | ||
username | guest | The user name for the client. |
password | guest | The password used for creating a connection. |
client_id | auto-generated | The client identifier used for creating a connection. |
Currently handled transports
Currently only 'tcp' transport is supported. 'tls' will however be supported and additional properties like 'keystore' and 'keystorelocation' will be added. The 'vm' transport should also be supported when a 0.10 Java broker will be availableCurrently only 'tcp' and 'vm' transports are supported. Each broker can take have additional options that are specific to that broker. The following are currently implemented options. To add support for further transports the ''client.transportTransportConnection'' class needs updating along with the parsing to handle the transport.
Option | Default | Description | ||
---|---|---|---|---|
retriestcp | 1 | The number of times to retry connection to this Broker | true | Use a TCP connection |
tlsssl | false | Use ssl on the a tls connection | ||
connecttimeout | 30000 | How long in (milliseconds) to wait for the connection to succeed | ||
connectdelay | none | How long in (milliseconds) to wait before attempting to reconnect |
Brokerlist failover option
No Format |
---|
failover='<method>[?<options>]'
|
Host port
The default host port used is 5672 for 'tcp'.
Failover
It is planned to introduce a failover property for controlling This option controls how failover occurs when presented with a list of brokers. There are only two methods currently implemented but interface qpid.jms.failover.FailoverMethod
can be used for defining further methods.
Currently implemented failover methods.
...
Method
...
Description
...
singlebroker
This
...
roundrobin
...
This method tries each broker in turn.
The current defaults are naturally to use the 'singlebroker' when only one broker is present and the 'roundrobin' method with multiple brokers. The '''method''' value in the URL may also be any valid class on the classpath that implements the FailoverMethod
interfaceis however not yet supported.
Sample URLs
No Format |
---|
amqp:///test?brokerlist='localhost' amqp:///test?brokerlist='tcp://anotherhost:5684?retries='10'' amqp://guest:guest@/test?brokerlist='vm://:1;vm://:2'&failover='roundrobin' amqp://guest:guest@/test?brokerlist='vm://:1;vm://:2'&cyclecount='20' amqp://guest:guest@client/test?ssl='true'&brokerlist='tcp://localhost;tcp://redundant-server:5673?ssl='false''&failover='roundrobin'qpid:@tcp:myHost qpid:client_id=myClientIDpassword=myPassword;username=myUsername@tcp:myHost:5644 |