amazon-sqs-java-messaging-lib icon indicating copy to clipboard operation
amazon-sqs-java-messaging-lib copied to clipboard

Change WAIT_TIME_SECONDS in SQSMessageConsumerPrefetch

Open sidath80 opened this issue 6 years ago • 2 comments

Hi All,

I need to change the value of the WAIT_TIME_SECONDS in SQSMessageConsumerPrefetch to less than 10 seconds.Currently it is 20s.

I am using following code to create the SQS listener ,

SQSConnectionFactory connectionFactory = new SQSConnectionFactory( new ProviderConfiguration(), AmazonSQSClientBuilder.standard() .withCredentials( new InstanceProfileCredentialsProvider(false))

);

@Bean
public DefaultJmsListenerContainerFactory jmsListenerContainerFactory() {
    DefaultJmsListenerContainerFactory factory =
            new DefaultJmsListenerContainerFactory();
    factory.setConnectionFactory(this.connectionFactory);
    factory.setDestinationResolver(new DynamicDestinationResolver());
    factory.setConcurrency("3-10");
    return factory;
}

Thank you Sid

sidath80 avatar Oct 29 '19 00:10 sidath80

Looks like it was fixed https://github.com/awslabs/amazon-sqs-java-messaging-lib/pull/140

turnopil avatar Jan 11 '23 09:01 turnopil

I feel that rather than using Reflection to set this value, this should be configurable via properties.

christian-zyweck avatar Aug 30 '23 13:08 christian-zyweck