Description
When closing a Session that is currently part of a Distributed Transaction the Session close method needs to block until the DTC completes the outstanding transaction, otherwise the state of the Session can be invalid as its parent connection is closing and cause a RemoveInfo for the session to be sent with the wrong lastDeliveredSequenceId. This causes message not dispatched to consumers but stored in prefetch to be marked as redelivered by the broker.