String msg = e.getMessage();
// Only retry if AMQ failed to create a temp queue
if (msg != null && msg.startsWith("Failed to resolve replyTo destination on the exchange")) {
ree = e;
} else {
throw new DuccRuntimeException("Ducc JMS Dispatcher is unable to deliver a request.", e);
}
}
}
// when retries hit the threshold, just throw an exception
if (i == maxRetryCount) {
throw new DuccRuntimeException(
"ActiveMQ failed to create temp reply queue. After 20 attempts to deliver request to the OR, Ducc JMS Dispatcher is giving up.",
ree);
}
return unmarshallDuccEvent(reply);
}