HORNETQ-1089

Hi, 

This pull request is an attempt to solve [HORNETQ-1089](https://issues.jboss.org/browse/HORNETQ-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&_sscc=t).  To test the new functionality I have written integration and unit tests.