Home  > 

Class container

A top-level container of connections, sessions, senders, and receivers.

A container gives a unique identity to each communicating peer. It is often a process-level object.

It serves as an entry point to the API, allowing connections and links to be established. It can be supplied with an event handler in order to intercept important events, such as newly received messages or newly issued link credit for sending messages.

Related: Class connection, Class session, Class sender, Class receiver

Implementations: C, C++, Python

AMQP: Conceptual overview

Basic properties and methods

PropertySummaryTypeDefault valueMutableNullable
id A globally unique container identifierstringgenerated☐☐
auto-stop Stop when all active connections and listeners are closedbooleantrue☒☐
MethodSummaryInputsOutputs
connections The connections managed by this containeriterator of connection
constructor Create a new container[messaging-handler], [id]container
run Start processing events
stop Shutdown open connections and stop processing events[error-condition]

Configuration

PropertySummaryTypeDefault valueMutableNullable
client-connection-options Default options for new outbound connectionsconnection-optionsinstance☐☐
server-connection-options Default options for new inbound connectionsconnection-optionsinstance☐☐
session-options Default options for new sessionssession-optionsinstance☐☐
sender-options Default options for new senderssender-optionsinstance☐☐
receiver-options Default options for new receiversreceiver-optionsinstance☐☐

Connection operations

MethodSummaryInputsOutputs
connect Create and open an outbound connectionconnection-url, [options]connection
listen Listen for incoming connectionslisten-info, [handler], [options]listener

Sender and receiver operations

MethodSummaryInputsOutputs
open-receiver Create and open a receiving linkaddress-url, [receiver-options]receiver
open-sender Create and open a sending linkaddress-url, [sender-options]sender

Event processing

MethodSummaryInputsOutputs
schedule Schedule a function calldelay, function