Review Board 1.7.22

QPID-3604 - If connection is started and stopped, the client may get more messages than required by the prefetch value

Review Request #2832 - Created Nov. 15, 2011 and submitted

rajith attapattu
alex.rufous, gordon, robbie, wprice
This attempts to fix one of the issues related to the handling of Message credits. See QPID-3602 for an overall picture of the various issues.

This particular patch does the following.
1. When the connection is stopped, it sends message.stop() & releases all messages in the prefetch buffer.
2. It will also release any messages (that were in flight) that comes after the connection is stopped. (*)

(*) This interferes with the immediate_prefetch feature. However I don't know if immediate prefetch is really required in the 0-10 path.

As always comments, suggestions & criticisms are equally welcomed.
See PrefetchBehaviourTest#testConnectionStop for more details.
Review request changed
Updated (Jan. 10, 2012, 3:52 a.m.)