title: Ambiguous factory method matches found in bean 'container'
body: <p>I want to implement multiple queue listeners in Spring amqp application. I tried this:</p>
  
  <pre><code>    @Bean
      public SimpleMessageListenerContainer container(ConnectionFactory cf, DatabaseTransactionListener listener) {
          SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(cf);
          container.setQueueNames(QUEUE_DATABASE_TRANSACTION);
          container.setMessageListener(new MessageListenerAdapter(listener, "databaseTransaction"));
          container.setMessageConverter(new SerializerMessageConverter());
          return container;
      }
  
      @Component
      class DatabaseTransactionListener {
  
          public TransactionsBean databaseTransaction(TransactionsBean ro) {
              TransactionsBean obj = new TransactionsBean();
              System.out.println("!!!! Performing TransactionsBean processing !!!!");
              obj.setTransaction_id(" ??? some_id: " + ro.getMerchant_id());
              return obj;
          }
      }
  
      @Bean
      public SimpleMessageListenerContainer container(ConnectionFactory cf, ApiAttemptListener listener) {
          SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(cf);
          container.setQueueNames(QUEUE_DATABASE_API_ATTEMPT);
          container.setMessageListener(new MessageListenerAdapter(listener, "apiattemptTransaction"));
          container.setMessageConverter(new SerializerMessageConverter());
          return container;
      }
  
      @Component
      class ApiAttemptListener {
  
          public ApiAttemptsBean apiattemptTransaction(ApiAttemptsBean ro) {
              ApiAttemptsBean obj = new ApiAttemptsBean();
              System.out.println("!!!! Performing ApiAttempts processing !!!!");
              obj.setMerchant_id(454545);
              return obj;
          }
      }
  </code></pre>
  
  <p>I get error during startup: <code>Error creating bean with name 'container' defined in org.database.context.ContextServer: Ambiguous factory method matches found in bean 'container'</code></p>
  
  <p>What is the proper way to implement multiple listeners in order to process multiple queues?</p>