This is related to https://issues.apache.org/jira/browse/AMQ-6763.
By default, FutureResponse.getResult() calls ArrayBlockingQueue.take() which blocks indefinitely.
When the broker becomes unreachable without the TCP connection being properly closed (network partition, half-open connection), threads calling ResponseCorrelator.request(Object) hang forever — as shown in the thread dump on the Jira.
I propose to expose a way for the user to define a timeout, something like -Dorg.apache.activemq.transport.ResponseCorrelator.maxResponseTimeout=30000. I wonder if we should not define this timeout by default.