Where did new Queue("events") come from? I'm looking at the hello world sample and it says
Code:
@Bean
public Queue helloWorldQueue() {
return new Queue(this.helloWorldQueueName);
}
Have you got an old version of the sample (look on Github for the latest https://github.com/SpringSource/spring-amqp-samples)? What's the "Spring consumer project" that you are looking at?
I don't really know what you were struggling with, but thanks for asking. It seems to me that maybe it wasn't Spring doing anything magic that got you started, just that eventually the queue was declared in the broker and wasn't deleted when either the broker or the client died because you changed the default settings of those flags. It shouldn't be any different in .NET, but then it looks like the code samples you give from .NET are not from Spring AMQP.NET.
If you think it would be a easier API for beginners if RabbitTemplate accepted a Queue instead of a queue name (String) for receiving, I get that. Is that the problem?