How to configure custom Spring Cloud AWS SimpleMessageListenerContainerFactory so it keeps working with @SqsListener
<p>I am trying to get SpringCloud AWS SQS working with a custom <code>SimpleMessageListenerContainerFactory</code> so i can set timeouts and maxnumber of messages. Without the custom <code>SimpleMessageListenerContainerFactory</code> methods that are annotated with the <code>@SqsListener</code> nicely pickup messages that are in SQS. But when i try to configure a custom <code>SimpleMessageListenerContainerFactory</code> the annotation stops working. </p>

<pre><code>@Bean
public SimpleMessageListenerContainerFactory simpleMessageListenerContainerFactory(AmazonSQSAsync amazonSqs) {
    SimpleMessageListenerContainerFactory factory = new SimpleMessageListenerContainerFactory();
    factory.setAmazonSqs(amazonSqs);
    factory.setAutoStartup(true);
    factory.setMaxNumberOfMessages(10);
    factory.setWaitTimeOut(2000);
    return factory;
}
</code></pre>

<p>How can i get the normal @SqsListener behaviour when defining a custom SimpleMessageListenerContainerFactory?</p>

<pre><code>@Component
public class SqsMessageConsumer {
    @SqsListener("incoming-data")
    private void doSomething(String payload) {
        System.out.println("data = " + payload);
    }
}
</code></pre>