https://issues.apache.org/jira/browse/AMQ-5065

Patch applied.
https://issues.apache.org/jira/browse/AMQ-5066

apply patch after review