On 22 June 2012 16:47, Ken Giusti <[email protected]> wrote:
> Rajith,
>
> +1 to this idea - I recently gave up on a simple java based demo because I
> couldn't easily figure out the connection syntax (and I was trying to port an
> existing python example).
>
> This part esp. blew my mind (From Andrew's mail):
>
>>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, even the existing C++ and python clients are inconsistent? Yikes!
>
> We should have One Syntax to Rule Them All, shouldn't we?
>
> For the record, I like Rajith's approach of:
>
> url; {options map}
>
> but I'd move away from putting the failover list into the options map -
> that's confusing and probably error prone: can my failover urls have failover
> urls?
>
> Instead, could our syntax allow a connection to be specified as a list of the
> above, and consider the list itself as the failover configuration? Like:
>
> "url1; {options1}, url2; {options2}, ..."
>
> try to connect to url 1 using options1, if fail, try url2... etc.
>
I tend to agree with the above. The reason it may seem unappealing is
that there is likely a fair amount of commonality between {options1}
and {options2}, however I think that the client URL is the wrong place
to solve this. I would argue that ideally we shouldn't be expecting
the alternate brokers to be specified at the clients - it seems to be
an administrative nightmare (and rather error prone).
It seems to make much more sense for brokers which are part of an
"equivalence group" to each hold enough configuration to be able to
inform clients at connection of other such brokers... thus url1;
{options1} would actually then lead to the client retrying first
against the equivalent brokers which the broker at url1 told them
about... only if they are all done would it need to try url2 as
specified in the client configuration, etc.
-- Rob
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]