qpid-proton mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darryl L. Pierce" <dpie...@redhat.com>
Subject Re: Specification question: attach with no source/target
Date Mon, 22 Apr 2013 13:38:06 GMT
On Mon, Apr 22, 2013 at 09:31:09AM -0400, Rafael Schloming wrote:
> To understand this, it's helpful to think in terms of which state is
> associated with the transport layer and which is associated with the
> application layer. It also helps to think in terms of communication
> endpoints, i.e. an entity capturing the relevant state for a given
> communication layer. The link construct exists at the transport layer, and
> at the transport layer, link establishment never fails. An attach is always
> answered by another attach, and paired set of link endpoints (both local
> and remote) are always created. The source and target serve as a binding
> between the application level communication endpoint and the transport
> layer endpoint. The reason this can be null is because there isn't always
> an application level endpoint.
> 
> 
> As a concrete example you might consider sending an attach from a client to
> a broker and naming a queue that does not exist:
> 
>    Client -------- ATTACH(target="no-such-queue") ---> Broker
> 
> The broker then responds with an attach where the target is null:
> 
>    Client <------- ATTACH(target=null) --------------- Broker
> 
> The client then compares the target he asked for ("non-existent-queue")
> with the target he got (null) and can indicate an error to the user.
> 
> This might seem like an odd way to fail link establishment, however it is
> really a special case of a more general negotiation pattern, for example
> the same pattern might be used to do a kind of redirect:
> 
>    Client -------- ATTACH(target="old-queue") -------> Broker
>    Client <------- ATTACH(target="new-queue") -------- Broker
> 
> There are also other properties of sources and targets that can be
> negotiated in this way, e.g. distrubtion mode, filters, general
> capabilities and/or properties. So the general pattern is link
> establishment always succeeds at the transport layer, however at the
> application layer you might not get exactly what you asked for, and if the
> remote target/source is indicated as null, then you didn't get anything at
> all.

Ah, I see how it's useful. It just seemed odd without the concrete
examples. Thanks!

-- 
Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc.
Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/


Mime
View raw message