No Format |
---|
<Exchange Class>://<Exchange Name>/[<Destination>]/[<Queue>][?<option>='<value>'[&<option>='<value>']] |
This URL format is used for two purposes in the code base. The broker uses this in the XML configuration file to create and bind queues at broker startup. It is also used by the client as a destination.
This format was used because it allows an explicit description of exchange and queue relationship.
The Exchange Class is not normally required for client connection as clients only publish to a named exchange however if exchanges are being dynamically instantiated it will be required. The class is required for the server to instantiate an exchange.
There are a number of options that are currently defined:
Option | type | Description |
---|---|---|
exclusive | boolean | Is this an exclusive connection |
autodelete | boolean | Should this queue be deleted on client disconnection |
durable | boolean | Create a durable queue |
clientid | string | Use the following client id |
subscription | boolean | Create a subscription to this destination |
routingkey | string | Use this value as the routing key |
Using these options in conjunction with the Binding URL format should allow future expansion as new and custom exchange types are created.
The URL format requires that at least one Queue or routingkey option be present on the URL.
The routingkey would be used to encode a topic as shown in the examples section below.
Examples
Queues
A queue can be created in QPID using the following URL format.
direct://amq.direct//<Queue Name>
For example: direct://amq.direct//simpleQueue
Queue names may consist of any mixture of digits, letters, and underscores.
Topics
A topic can be created in QPID using the following URL format.
topic://amq.topic/<Topic Subscription>/
The topic subscription may only contain the letters A-Z and a-z and digits 0-9.
No Format |
---|
direct://amq.direct//SimpleQueue direct://amq.direct//UnusuallyBoundQueue?routingkey='/queue' topic://amq.topic?routingkey='stocks.#' topic://amq.topic?routingkey='stocks.nyse.ibm' |