27.01.2014 Views

AMQP Specification Transport

AMQP Specification Transport

AMQP Specification Transport

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>AMQP</strong> <strong>Specification</strong>.<br />

Session<br />

4 Session<br />

An <strong>AMQP</strong> Session is a named dialog between two <strong>AMQP</strong> peers. Each participant maintains a Session<br />

Endpoint that stores the conversational state for that session. Session Endpoints are "attached" when they are<br />

associated with an open Connection. Session Endpoints may become detached deliberately, when a failure<br />

occurs in the network, or when a failure occurs at one of the endpoints. Session Endpoints may be<br />

configured to retain their state either temporarily or permanently when they become detached.<br />

4.1 Naming a Session<br />

Session names are supplied by the initiating peer, and MUST be globally unique among all open sessions.<br />

Once a session is cleanly closed, its may be reused. Session names are represented by opaque binary strings<br />

up to 65535 characters long. Example naming schemes include mechanically generated UUID-based names<br />

as well as stable, manually chosen URI based names. Session names are only exchanged during the attach<br />

and detach procedures, so there is no significant overhead to choosing large names.<br />

4.1.1 session-name: vbin16 (opaque session name)<br />

The session name uniquely identifies an interaction between two peers. It is globally unique among all open<br />

sessions. Once a session is cleanly closed, its name may be reused.<br />

4.2 Establishing a Session<br />

Sessions are established by creating a Session Endpoint, assigning it to an unused channel number, and<br />

sending an ATTACH carrying the state of the newly created Endpoint. The partner responds with an<br />

ATTACH carrying the state of the corresponding Endpoint, creating and/or mapping the Endpoint to an<br />

unused channel number if necessary. To avoid accidentally resuming an existing session, the initiating peer<br />

may optionally wish to verify that the corresponding Endpoint is newly created.<br />

Endpoint<br />

Endpoint<br />

=============================================================<br />

ATTACH(name=..., [CH3]---------><br />

opening=1, ...) +--[CH7] ATTACH(name=...,<br />

/ opening=1, ...)<br />

/<br />

(1)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!