OK, thanks for clearing that up.
I have tried the "reply-queue" method but have problems getting it to work.
I changed my rabbit template definition to the following:
Code:
<rabbit:queue id="replyQueue"/>
<rabbit:template id="rabbitTemplate" connection-factory="connectionFactory" reply-timeout="120000" reply-queue="replyQueue">
<rabbit:reply-listener />
</rabbit:template>
but it fails on startup with:
Code:
Jul 13, 2012 9:28:36 AM org.springframework.amqp.rabbit.core.RabbitAdmin initialize
WARNING: Auto-declaring a non-durable Queue (ee1dae78-ec5b-4357-a45d-ffe58265d704). It will be redeclared if the broker stops and is restarted while the connection factory is alive, but all messages will be lost.
Jul 13, 2012 9:28:36 AM org.springframework.amqp.rabbit.core.RabbitAdmin initialize
WARNING: Auto-declaring an auto-delete Queue (ee1dae78-ec5b-4357-a45d-ffe58265d704). It will be deleted by the broker if not in use, and all messages will be lost. Redeclared when the connection is closed and reopened.
Jul 13, 2012 9:28:36 AM org.springframework.amqp.rabbit.core.RabbitAdmin initialize
WARNING: Auto-declaring an exclusive Queue (ee1dae78-ec5b-4357-a45d-ffe58265d704). It cannot be accessed by consumers on another connection, and will be redeclared if the connection is reopened.
Jul 13, 2012 9:28:37 AM org.springframework.amqp.rabbit.listener.BlockingQueueConsumer start
Jul 13, 2012 9:28:36 AM org.springframework.amqp.rabbit.core.RabbitAdmin initialize
WARNING: Auto-declaring an exclusive Queue (ee1dae78-ec5b-4357-a45d-ffe58265d704). It cannot be accessed by consumers on another connection, and will be redeclared if the connection is reopened.
Jul 13, 2012 9:28:37 AM org.springframework.amqp.rabbit.listener.BlockingQueueConsumer start
WARNING: Reconnect failed; retries left=2
java.io.IOException
at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:106)
at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:102)
at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:124)
at com.rabbitmq.client.impl.ChannelN.queueDeclarePassive(ChannelN.java:755)
at com.rabbitmq.client.impl.ChannelN.queueDeclarePassive(ChannelN.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.springframework.amqp.rabbit.connection.CachingConnectionFactory$CachedChannelInvocationHandler.invoke(CachingConnectionFactory.java:348)
at $Proxy690.queueDeclarePassive(Unknown Source)
at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:213)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:516)
at java.lang.Thread.run(Thread.java:636)
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; reason: {#method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue 'replyQueue' in vhost '/', class-id=50, method-id=10), null, ""}
As you can see a Queue called "ee1dae78-ec5b-4357-a45d-ffe58265d704" is declared but the listener uses the bean name as the queue name when it tries to consume.
Have I got the wrong end of the stick here or is it a bug? The documentation is unclear as to how the reply queue itself should be configured 
Regards,
AJ.