6.2.3. Connection URLs

6.2.3. Connection URLs

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'

MRG Messaging supports the following properties in Connection URLs:

Option Type Description
brokerlist see below The broker to use for this connection. In the current release, precisely one broker must be specified.
maxprefetch -- The maximum number of pre-fetched messages per destination.
sync_persistence false When true, a sync command is sent after every persistent message to guarantee that it has been received.
Table 6.2. Connection URL Properties

Broker lists are specified using a URL in this format:

brokerlist=<transport>://<host>[:<port>]

For instance, this is a typical broker list:

brokerlist='tcp://localhost:5672'