Hi Monish,
Here's how to programmatically configure a RabbitTemplate to use a fixed reply queue with a reply listener container...
Code:
SimpleMessageListenerContainer replyContainer = new SimpleMessageListenerContainer(connectionFactory);
replyContainer.setQueueNames("reply.queue");
RabbitTemplate template = new RabbitTemplate(connectionFactory);
template.setReplyQueue(new Queue("reply.queue"));
replyContainer.setMessageListener(template);
replyContainer.afterPropertiesSet();
replyContainer.start();
Object reply = template.convertSendAndReceive("test.exchange", "test.binding", "Hello, world!");
Hope that helps.
There is currently no way to limit the number of channels; the number of cached channels can be controlled on the CachingConnectionFactory.