title: Spring AMQP cannot create bean to return a List<Binding>
body: <p>I am trying to use Spring AMQP, version 2.1.2.release, to create multiple bindings to a topic exchange.</p>
  
  <p>I found this question: <a href="https://stackoverflow.com/questions/33087332/how-to-setup-multiple-topics-in-a-rabbitmq-java-config-class-using-spring-framew">How to setup multiple topics in a RabbitMQ Java config class using Spring Framework?</a></p>
  
  <p>Which seemed to have the answer. I also found the <a href="https://docs.spring.io/spring-amqp/docs/1.5.1.RELEASE/reference/htmlsingle/#collection-declaration" rel="nofollow noreferrer">documention</a> which provides the same solution.</p>
  
  <p>However, the Bindings are not being created when I return a List in my Bean.  If I return a single Binding, then it does work. I cannot add a comment to that question due to lack of reputation.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>    @Bean
  public TopicExchange topicExchange() {
      return new TopicExchange("topicExchange");
  }
  
  @Bean
  public Queue testQueue() {
      return new Queue("testQueue");
  }
  
  @Bean
  List&lt;Binding&gt; multipleBindings() {
      return Arrays.asList(
              BindingBuilder.bind(testQueue()).to(topicExchange()).with("t1"),
              BindingBuilder.bind(testQueue()).to(topicExchange()).with("t2"));
  }
  
  @Bean
  Binding singleBinding() {
      return BindingBuilder.bind(testQueue()).to(topicExchange()).with("t3");
  }
  </code></pre>
  
  <p>In this code, I get the "t3" topic binding, but do not see "t1" or "t2" when I look at the Rabbit Management console.</p>
  
  <p>Please help, as this code looks very simple and it follows the documentation. What am I missing?</p>
  
  <p>Thank you</p>