https://issues.apache.org/jira/browse/AMQCPP-585

Fix and test.
(cherry picked from commit 6ddd619bae81215822c7aec3b2469ed6ec894473)
3 files changed