qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Conway <acon...@redhat.com>
Subject c++ (and other bindings) auto close behavior for handlers?
Date Thu, 07 Apr 2016 20:07:25 GMT
Currently proton-C and the various bindings do *not* auto-close
contained objects when the container closes. I.e. closing a connection
does not close its sessions, closing a session does not close its links
etc. Also closing a transport does not automatically close its
connection.

I believe there are some reconnect use-cases that require this, e.g. if
the transport closes unexpectedly you want to keep the connection and
its children around so you can use them to re-build connection state on
a new transport.

However in the majority of cases it is a huge pain. Look at the
existing broker.cpp example, `remove_stale_consumers`. The example
isn't even complete: you must implement transport_close,
connection_close, link_close (or in C++ sender_close and
receiver_close) AND session_close (forgotten in the broker.cpp example)
to clean up link resources correctly.

I'd like to find a way to automate this that doesn't break the
reconnect cases. Ideally I'd like it to be the default behavior unless
a reconnect handler is in play. Can that be done with the existing
event set or do we need new events?

Cheers,
Alan.

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


Mime
View raw message