I don't think there was ever any issue observed with the C++ clients, just that the Java 0-10 client failover (tests, against the C++ broker IIRC) stopped working properly when AMQSession_0_10 was changed to create a Session with 0 as the timeout in the Session constructor as opposed to the 1 normally used in AMQSession_0_10. This was done to match the 0 that the client actually always sends to the broker when attaching regardless of the real value (1) it considers the expiry variable to be, but that meant the Session always transitioned to the closed state instead of just detached, which the failover (tests) depends on.
The reason the previous change was made was so that when the broker asks the client to close the session (eg following management user intervention) it actually would instead of just sitting in the detached state. The changes you are proposing seem like they should make it so that when the broker tells the client to set its timeout to 0 before detaching it actually does it instead of just ignoring it, thereby making it transition to the closed state instead of just detached. Robbie > -----Original Message----- > From: Andrew Kennedy [mailto:[email protected]] > Sent: 21 July 2010 17:14 > To: [email protected] > Subject: 0-10 Session Close and Failover > > Hi. > > I have been looking at the 0-10 session close semantics, and been > meaning to ask this for a while... > > There is no explicit close message in 0-10, rather the session timeout > is supposed to be set to 0 seconds and then a session detach message > is sent. I have implemented this, since it requires simply creating a > handler for sessionRequestTimeout messages that actually sets expiry > to 0, as discussed on QPID-2586 and in this message on the dev list: > http://apache-qpid-developers.2158895.n2.nabble.com/Java-0-10-Session- > closure-expiry-timeout-td4865744.html#a4865744 > > Also, see comments in the code (in o.a.q.t.Session.java): > > // XXX: when the broker and client support full session > // recovery we should use expiry as the requested timeout > > // XXX: we manually set the expiry to zero here to > // simulate full session recovery in brokers that don't > // support it, we should remove this line when there is > // broker support for full session resume: > expiry = 0; > > which is exactly what I have done, I use the expiry field (therefore > on session create the timeout is set to 1 on both sides now) and (in > o.a.q.t.SessionDelegate.java) we have: > > // XXX: we ignore this right now, we should uncomment this > // when full session resume is supported: > > where I have uncommented the line following, which just calls > ssn.setExpiry(t.getTimeout()) and done the same in the new handler > for sessionRequestTimeout. > > I believe that this is a fairly simple and non-contentious change. One > thing that I noticed from other dev list messages is that this could > affect the failover mechanism used by the C++ clients. I ran the cpp > test suite with my changes and noticed no difference, but then I > couldn't see what tests would actually be affected. Can anyone shged > more light on the problems I might expect or be missing? > > Thanks, > Andrew. > -- > -- andrew d kennedy ? edinburgh : +44 7941 197 134 > > --------------------------------------------------------------------- > Apache Qpid - AMQP Messaging Implementation > Project: http://qpid.apache.org > Use/Interact: mailto:[email protected] --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
