They are different ways of doing a similar thing, at different times.
One differentiator might be whether you intend to both send and
receive, or just one.

The helloworld creates a connection, then later after knowing it has
been opened, creates *both* a sender and receiver on that connection
(on the hidden 'default session' that is also then created first...it
could instead manually create a session then create a sender/receiver
on it).

The simple send example is only going to send, so it immediately
'lines up' creation of the connection, the hidden 'default session',
and then a sender right at the outset without waiting for the
connection to actually open (which it might not).

On Thu, 29 Jun 2023 at 11:15, Tiaan Wessels <tiaanwess...@gmail.com> wrote:
>
> Thanks for the explanation. Some of the Qpid-Proton C++ examples calls
> connect from on_container_start and then open_sender/receiver from
> on_connection_open (helloworld) and others calls open_sender directly from
> on_container_start (simple_send). When would you use either approach ? I
> presume this is due the default session you refer to ?
>
> On Fri, 9 Jun 2023 at 10:33, Robbie Gemmell <robbie.gemm...@gmail.com>
> wrote:
>
> > The 'transport' is somewhat conceptual and handles
> > generating/sending/receiving the AMQP frames/protocol bytes over the
> > TCP transport connection, based on the activity of the related AMQP
> > 'connection' object and its children, with these all relating closely
> > to actual AMQP protocol entities. The connection can have sessions, on
> > which actual senders and receivers are created and send/receive
> > messages. The callbacks relate to each of these entities being opened
> > against the peer (e.g a broker). Some of the APIs simplify this by
> > creating a 'default session' to allow dealing more directly with
> > creating senders and receivers on.
> >
> > On Thu, 8 Jun 2023 at 11:50, Tiaan Wessels <tiaanwess...@gmail.com> wrote:
> > >
> > > Hi,
> > > What is the differences between
> > > on_transport/connection/session/sender/receiver_open? The docs are scant
> > on
> > > explanations.
> > > Thanks
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
> > For additional commands, e-mail: users-h...@qpid.apache.org
> >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to