This contains a patch that fixes the issue mentioned here.
However the fix needs the session reference to be valid in order to perform the lookups.
However the code in AMQMessageDelegate_0_10 and AMQMessageDelegate_0_8 relies on the session being null to figure out if the ack mode is CLIENT_ACK in the acknowledge method.
I am not sure if this is a correct assumption to make as somebody could easily violate this.
Therefore I changed the code to check the ack mode explicitly.
I am also setting a valid session reference to every message irrespective of the ack mode.