amqp — archive
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
— [Date Index]
| [Thread Index]
| [Month Index]
| [List Home]
AW: [amqp] Global addressing model - brain dump
On Fri, Oct 5, 2018 at 9:33 AM Ted Ross < [email protected]
> wrote:
On Fri, Sep 14, 2018 at 6:04 AM Clemens Vasters < [email protected]
> wrote:
For the Management spec I also need the Addressing spec to make progress, so I m now taking a fresh look at this.
From the F2Fs I recall that our biggest holdup was that we ve got tension between several distinct goals for addressing expressions:
a.
An address _expression_ should enable a client to find a server on an IP network to establish an AMQP TLS-first (5671) or TLS-upgrade (5672) connection, establish link(s) and transfer messages.
The address _expression_
therefore needs to hold DNS/IP/TCP addressing information, a protocol selector, and a link target.
b.
An address _expression_ should enable a sender to have messages routed to a receiver inside a (yet poorly defined)
AMQP network and fully abstracting the underlying IP layer, whereby the receiver address is a logical
construct that doesn t contain network-related information.
With such an address, it should be possible to find the receiving container (and node) by ways of:
a.
resolving the logical address to container name/location OR
b.
evaluating routing rules based on filter expressions that indirectly yield a container location
c.
An address _expression_ should enable a sender to route messages to a receiver inside a singular AMQP container, where address expressions correspond directly to node names inside of said container.
We also have amqp/amqps URIs being used in the wild based on the current draft and I don t want to break those.
Here s a proposal for an extended URI format that aims to hit all the goals at once:
{ amqp amqps } :
[ //user:key@ip-endpoint/ ] [ (container-name)/ ] [ [ $ ]
node-path ]
I ll start the explanation with examples, because they ll probably tell a whole lot of the story already:
amqps:// broker.example.com/queue1
DNS qualified address of a TCP/IP endpoint of an AMQP container with path for the queue1 AMQP node
amqp:(london-branch-34)/atm Logical AMQP network address of london-branch-34 with path for the atm AMQP node
amqps:// megabank.example.com/(london-branch-34)/atm
DNS qualified address of a gateway into an AMQP network, with logical AMQP network address as suffix
amqp:()/control Anonymous AMQP network address to be resolved into a container location by evaluating message metadata, with path for the control node on the resulting
container
somewhere Local container address of the something AMQP node
$somewhere AMQP reserved local container address
To start, I m splitting up the AMQP notion of container into two distinct concepts: gateway and container .
A gateway is a TCP/IP listener that speaks the AMQP wire protocol.
Clients establish connections and sessions with gateways.
Gateways are onramps into AMQP networks.
A container is a host for AMQP nodes.
Multiple containers may be interrelated (and opportunistically interconnected) to form a logical network, with lookup mechanisms that allow resolving logical names to specific
containers.
Each container MUST have a gateway.
Each configured relationship between containers holds information about which gateway ought to be used to reach the respective container.
The configured destination gateway
for any container MAY, however, be an intermediary, meaning it might take one or more further network resolution/routing steps to reach the destination container.
Not all gateways have to be containers.
A gateway can just do connection/session handling and never host nodes and/or take ownership of links; it might be a pure relay bridging sessions to another gateway.
If an endpoint is connected to a gateway that is not a container, what will the container-id field in the OPEN frame hold?
A TCP router or an Envoy TCP proxy are examples of such a gateway - although without any AMQP-specific smarts.
They tunnel an entire connection thru to an AMQP peer.
I'm not sure how such a gateway could do more
complex AMQP-specific routing (like redirecting sessions or links to multiple back-ends) without fabricating a container-id to the the inbound connection - in which case it would seem that it does have to be a container (or many containers)
[Clemens Vasters] I don t think you can connect (in the AMQP sense) to a gateway that has no explicit or implicit association with a container.
When you connect to a gateway via TCP, you end up at a container and the
container tells you its name as it responds to open.
The container-id in open is documented as the frame source, not target.
The container information in the URI is routing information for when the container the client learns about in open is not the expected container.
In that case, the container qualified URI goes into the link target address
or into to (anon terminus) for further resolution by internal means , which might result in the link/route be patched through further.
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
— [Date Index]
| [Thread Index]
| [Month Index]
| [List Home]