Home  > 

Class connection

A channel for communication between two peers on a network.

In current implementations, a connection corresponds to a TCP connection, represented by a transport.

A connection object contains zero or more session objects, which in turn contain zero or more senders and zero or more receivers.

Related: Class connection-options, Class transport, Class session

Implementations: C, C++, Java, Python

AMQP: Conceptual overview, Open performative, Close performative

Basic properties and methods

PropertySummaryTypeDefault valueMutableNullable
container The container holding this endpoint objectcontainerinstance☐☐
transport The associated network transporttransportinstance☐☐
sessions The sessions contained in this connectioniterator of sessioninstance☐☐
default-session The session used by open-sender and open-receiversessioninstance☐☐
MethodSummaryInputsOutputs
open Open the connection[connection-options]
close Close the connection[error-condition]

Endpoint lifecycle

PropertySummaryTypeDefault valueMutableNullable
state The remote endpoint stateendpoint-statediscovered☐☐
error The remote endpoint error conditionerror-conditiondiscovered☐☒

Event processing

MethodSummaryInputsOutputs
add-work Register a function to be calledfunction

Extended attributes

PropertySummaryTypeDefault valueMutableNullable
properties Application-defined propertiesmap of symbol ⇒ objectdiscovered☐☒
offered-capabilities Extensions the endpoint supportsarray of symboldiscovered☐☒
desired-capabilities Extensions the endpoint can usearray of symboldiscovered☐☒

Message operations

MethodSummaryInputsOutputs
send Send a message on the default session using an anonymous sendermessagetracker

Sender and receiver operations

MethodSummaryInputsOutputs
open-sender Create and open a sender using the default sessionaddress, [sender-options]sender
open-receiver Create and open a receiver using the default sessionaddress, [receiver-options]receiver

Session operations

MethodSummaryInputsOutputs
open-session Create and open a session[session-options]session

Identity

PropertySummaryTypeDefault valueMutableNullable
container-id The unique identity of the containerstringdiscovered☐☐
virtual-host The virtual host namestringdiscovered☐☐
user The identity of the user associated with the connectionstringdiscovered☐☐

Resource limits

PropertySummaryTypeDefault valueMutableNullable
idle-timeout The time after which an idle connection expiresdurationdiscovered☐☐
max-sessions The maximum active sessions allowedushortdiscovered☐☐
max-frame-size The maximum frame size alloweduintdiscovered☐☐