// Make sure the map stays clean if no response is received before timeout occurs.
// It would be nice if AmqpTemplate had a receive() method with a timeout parameter.
_executor.schedule(new Runnable() {
@Override
public void run() {
ByteArrayMessageReceiver receiver = _correlationId2MessageReceiver.remove(correlationId);
if (receiver != null) {
s_logger.error("Timeout reached while waiting for a response to send to {}", responseReceiver);
}
}
}, _timeout, TimeUnit.MILLISECONDS);