title: Spring cloud AWS multiple SimpleMessageListenerContainer configuration setup
body: <p>I am trying to instantiate multiple <code>SimpleMessageListenerContainer</code> and define custom <code>TaskExecutor</code> for independent <code>MessageListener</code> queues, The reason for this setup is I don't want to create a shared <code>SimpleMessageListenerContainer</code> where thread pool configuration is shared across all Message Listener queues. </p>
  
  <p>Can you please provide a suggestion? I tried following some of the spring-messaging-aws test case approach but doesn't seem to be working?</p>
  
  <pre><code>@Bean
  public SimpleMessageListenerContainerFactory simpleMessageListenerContainerFactory() {
      SimpleMessageListenerContainerFactory msgListenerContainerFactory = new SimpleMessageListenerContainerFactory();
      msgListenerContainerFactory.setAmazonSqs(amazonSQSClient());
      return msgListenerContainerFactory;
  }
  
  @Bean
  public SimpleMessageListenerContainer uplinkMessageListenerContainer() throws Exception {
      SimpleMessageListenerContainer msgListenerContainer = simpleMessageListenerContainerFactory().createSimpleMessageListenerContainer();
      msgListenerContainer.setAmazonSqs(amazonSQSClient());
      QueueMessageHandler messageHandler = new QueueMessageHandler();
      msgListenerContainer.setMessageHandler(messageHandler);
      StaticApplicationContext applicationContext = new StaticApplicationContext();
      applicationContext.registerSingleton("uplinkMessageListener", UplinkMessageListener.class);
  
      messageHandler.setApplicationContext(applicationContext);
      msgListenerContainer.setBeanName("testContainerName");
      messageHandler.afterPropertiesSet();
      msgListenerContainer.setMaxNumberOfMessages(maxNumberOfmessages);
      msgListenerContainer.setWaitTimeOut(waitTimeout);
      msgListenerContainer.setBackOffTime(backOfTime);
      msgListenerContainer.setAutoStartup(sqsAutoStartup);
      msgListenerContainer.setVisibilityTimeout(visibilityTimeout);
      msgListenerContainer.setTaskExecutor(createDefaultTaskExecutor("MPSQSUplinkMessageListener", 2, 10));
      msgListenerContainer.afterPropertiesSet();
      msgListenerContainer.start();
      return msgListenerContainer;
  }
  </code></pre>