https://issues.apache.org/jira/browse/AMQ-4472 - test case that shows the problem with prefetched messages and delayed close till commit