On Tue, Feb 3, 2015 at 4:26 PM, Darryl L. Pierce <dpie...@redhat.com> wrote:

> On Mon, Feb 02, 2015 at 09:12:22AM -0500, Darryl L. Pierce wrote:
> > Are there any example apps for Python that don't use the reactive APIs?
> If no examples, perhaps a primer of how the logical components of the
> enger interact to help guide providing an example?

The quick primer is that Connections/Sessions/Links/Deliveries pretty much
directly model the endpoint state described in the AMQP specification. In
order to wire that endpoint state up to a remote peer, you create,
configure, and bind a Transport object into the Connection. The Transport
has an interface that lets you pump bytes into/out of it. You can use this
to pump bytes into/out of a socket.

When you pump bytes from the socket into the Transport, it may change the
state of the Connection and/or any of the objects it contains (Sessions,
Links, Deliveries, etc). It may in fact cause new Session, Link, or
Delivery endpoints to be created. The best way to find out what exactly has
happened here is to use the events API.

The events API allows you to register the Connection with a Collector. When
a Connection is registered with a Collector it will post events to that
Collector. Each event has a pointer back into the object model indicating
which object has changed state, and a type that indicates how/why it
changed state. You can look at event.h (or the doxygen) for a list of all
the core events.


Reply via email to