amqp_url = "amqp:" prot_addr_list prot_addr_list = [prot_addr ","]* prot_addr prot_addr = tcp_prot_addr | tls_prot_addr tcp_prot_addr = tcp_id tcp_addr tcp_id = "tcp:" | "" tcp_addr = [host [":" port] ] host = <as per rfc3986> port = numberThe AMQP 0-10 format only provides protocol address information for a (list of) brokers.
[<user>/<pass>@]<hostname> | <ip-address>[:<port>]
Java ConnectionURLs look like this:
amqp://[<user>:<pass>@][<clientid>]/<virtualhost>[?<option>='<value>'[&<option>='<value>']]This syntax is very powerful, but it can also be fairly complex to work with, especially when one realises that one of the options in the above syntax is brokerlist='<broker url>' where broker url is itself a URL of the format:
<transport>://<host>[:<port>][?<option>='<value>'[&<option>='<value>']]so one may see ConnectionURLs that look like:
amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672?retries='10'&connectdelay='1000''
amqp_url = "amqp://" [ userinfo "@" ] addr_list [ vhost ] addr_list = addr *( "," addr ) addr = prot_addr [ options ] prot_addr = tcp_prot_addr | other_prot_addr vhost = "/" *pchar [ options ] tcp_prot_addr = tcp_id tcp_addr tcp_id = "tcp:" / "" ; tcp is the default tcp_addr = [ host [ ":" port ] ] other_prot_addr = other_prot_id ":" *pchar other_prot_id = scheme options = "?" option *( ";" option ) option = name "=" value name = *pchar value = *pchar
However it's been pointed out that in fact the URL does already specify a 1-level hierarchy of address / vhost. In the future the hierarchy could be extended to address objects within a vhost such as queues, exchanges etc. So this proposal adopts amqp:// syntax.
It's easy to write a backward-compatible parser by relaxing the grammar as follows:
amqp_url = "amqp:" [ "//" ] [ userinfo "@" ] addr_list [ vhost ]
Option format is ?foo=bar;x=y rather than ?foo='bar'&x='y'. The use of "'" quotes is not common for URI query strings. The use of "&" as a separator creates problems
user, pass and clientid are options rather than having a special place at the front of the URL. clientid is a Qpid proprietary property and user/pass are not relevant in all authentication schemes.
Qpid M4 Java URLs requires the brokerlist option, so this is an easy way to detect a Qpid M4 URL vs. an Extended AMQP 0-10 URL and parse accordingly.
The option format is the same as that of the C++ qpid::messaging Connection class. for example: "{reconnect: true, tcp-nodelay: true}":
option name | value type | semantics |
---|---|---|
maxprefetch | integer | The maximum number of pre-fetched messages per destination. |
sync_publish | {'persistent' | 'all'} | A sync command is sent after every persistent message to guarantee that it has been received; if the value is 'persistent', this is done only for persistent messages. |
sync_ack | boolean | A sync command is sent after every acknowledgement to guarantee that it has been received. |
use_legacy_map_msg_format | boolean | If you are using JMS Map messages and deploying a new client with any JMS client older than 0.8 release, you must set this to true to ensure the older clients can understand the map message encoding. |
failover | {'roundrobin' | 'singlebroker' | 'nofailover' | 'failover_exchange'} | If roundrobin is selected it will try each broker given in the broker list. If failover_exchange is selected it connects to the initial broker given in the broker URL and will receive membership updates via the failover exchange. |
cyclecount | integer | For roundrobin failover cyclecount is the number of times to loop through the list of available brokers before failure. |
username | string | The username to use when authenticating to the broker. |
password | string | The password to use when authenticating to the broker. |
sasl_mechanisms | string | The specific SASL mechanisms to use when authenticating to the broker. The value is a space separated list. |
sasl_mechs | string | The specific SASL mechanisms to use when authenticating to the broker. The value is a space separated is a space separated list. This is simply a synonym for sasl_mechanisms above |
sasl_encryption | boolean | If sasl_encryption='true' , the JMS client attempts to negotiate a security layer with the broker using GSSAPI to encrypt the connection. Note that for this to happen, GSSAPI must be selected as the sasl_mech. |
ssl | boolean | If ssl='true' , the JMS client will encrypt the connection using SSL. |
reconnect | boolean | Transparently reconnect if the connection is lost. |
reconnect_timeout | integer | Total number of seconds to continue reconnection attempts before giving up and raising an exception. |
reconnect_limit | integer | Maximum number of reconnection attempts before giving up and raising an exception. |
reconnect_interval_min | integer representing time in seconds | Minimum number of seconds between reconnection attempts. The first reconnection attempt is made immediately; if that fails, the first reconnection delay is set to the value of reconnect_interval_min ; if that attempt fails, the reconnect interval increases exponentially until a reconnection attempt succeeds or reconnect_interval_max is reached. |
reconnect_interval_max | integer representing time in seconds | Maximum reconnect interval. |
reconnect_interval | integer representing time in seconds | Sets both reconnection_interval_min and reconnection_interval_max to the same value. The default value is 5 seconds |
heartbeat | integer representing time in seconds | Requests that heartbeats be sent every N seconds. If two successive heartbeats are missed the connection is considered to be lost. |
protocol | string | Sets the underlying protocol used. The default option is 'tcp'. To enable ssl, set to 'ssl'. The C++ client additionally supports 'rdma'. |
tcp-nodelay | boolean | Set tcp no-delay, i.e. disable Nagle algorithm. |
sasl_protocol | string | Used only for Kerberos. sasl_protocol must be set to the principal for the qpidd broker, e.g. qpidd/ |
sasl_server | string | For Kerberos, sasl_mechs must be set to GSSAPI, sasl_server must be set to the host for the SASL server, e.g. sasl.com. |
trust_store | string | path to Keberos trust store |
trust_store_password | string | Kerberos trust store password |
key_store_password | string | Kerberos key store password |
ssl_cert_alias | string | If multiple certificates are present in the keystore, the alias will be used to extract the correct certificate. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|