Issues with RabbitTemplate Temporary Reply Queues

Details

Description

Temporary Reply Queues are configured autoAck=false, but we don't ack the reply. If using a cached channel, this causes accounting problems on the Rabbit admin (channel shows unacked count).

Also, since the replyHandoff is a SynchronizedQueue, there is a race condition in the case the timeout is exceeded just as the reply is received; the consumer thread hangs on the put() because there is nobody in take().