On Thu, 2012-06-21 at 10:08 -0400, Rajith Attapattu wrote:
> Hi All,
> 
> Since we are trying to provide a consistent API for all our clients,
> it would be beneficial to have a connection string that can be used
> across all clients.
> This is a topic that has been widely discussed but without much consensus.
> 
> The c++ client and python uses a simple scheme.
> It specifies a url which serves as the initial contact point and a
> bunch of options as a map.
> One of those options is reconnect_urls, a comma separated list of urls
> to connect to during failover.
> 
> I propose we use the same format for the Java API.

It is important to note that there are actually *2* different URL
schemes in use:

(Syntax a little simplified for understanding purposes)
1) Specifying a "normal" connection URL from the python client:
url ::= [(amqp|amqps)://][user[/password]@](hostname|literal)[:port]

2) C++ URL including cluster failover list:
The python client needs to understand this too to participate in
clustering with failover)
protocol ::= tcp | ssl | rdma
address ::= [protocol:](hostname|literal)[:port]
url::= [amqp:][user[/password]@]address{,address}*

So you need to be more specific. Obviously we should be striving to
unify these URL formats too.

* These describe an overlapping language! Specifically the C++ syntax
does not accept "://" after the url scheme. I propose that it should -
this would make the languages much more compatible.

* The python syntax would use amqps://host for a secure connection
whereas the C++ syntax would use amqp:ssl:host for the same connection.
I personally prefer the python syntax as it would allow you to eliminate
the protocol marker in the C++ address element.

* The major point of the C++ syntax is to allow multiple addresses (with
different protocols) in the url. Provisionally I'd prefer using a comma
separated list of urls for this where it's appropriate rather than
including it the the url format itself, but I'm much less clear about
this specific point.

Also note that the C++ syntax is actually very close to a syntax
specified in the 0-10 amqp specification, although its purpose is not
really specified there.

Andrew



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to