[Bug#42788] Backport of https://issues.jboss.org/browse/HORNETQ-1190