Robbie Gemmell wrote:
The 'bug' is as I described in an earlier email, the desire to make it
so that the client would respond to a broker request to close to the
session (e.g. as invoked via management) by actually transitioning to
the closed state instead of the detached state (failure to do so leads
to further attempts to use the session spending 60s doing nothing
before simply throwing an exception reporting a timeout waiting for
the session to become open, rather than why it was 'closed').

That previously didnt happen because the client advertised a timeout
of 0 to the broker but set the expiry value to be 1 locally (the value
of which is then used to determine what state to transition into when
the detach is recieved) and then ignored the sessionRequestTimout
value of 0 sent by the broker before the close detach. Previously it
was attempted to just set the expiry to 0 on the client but the issue
seemed to be that failover depended on the client going into the
detached state and so that caused the failover tests to fail.

In actually implementing the sessionRequestTimeout() handling I
believe Andrew was aiming to have the client respond to the brokers
session close request by first setting the expiry to 0 and then
detaching, thus transitioning the client Session to the closed state.
However, as you mention the changes also had the effect of negotiating
the value with the broker to be 1, which it didnt previously.

One way to fix this would be to have the broker supply an exception code when it closes the session. I believe this would cause the client session to transition into the CLOSED state.

As it is the code doesn't distinguish between a session being aborted indirectly via connection death, and a session being aborted directly by the server. I think you would need to modify the code to differentiate between these two cases if you wanted to avoid using an exception.

I think I would probably try the exception route first as it seems more friendly to be explicit about why the session is being killed.

--Rafael


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to