spring-attic / spring-cloud-aws

All development has moved to https://github.com/awspring/spring-cloud-aws Integration for Amazon Web Services APIs with Spring
https://awspring.io/
Apache License 2.0
589 stars 376 forks source link

AmazonSQSAsync default bean is not overrided using service region property #791

Open renato04 opened 2 years ago

renato04 commented 2 years ago

Type: Bug

Component: SQS

Describe the bug I'm using the region properties to override the default region like this

cloud.aws.sqs.endpoint=http://localhost:4566
cloud.aws.sqs.region=sa-east-1

The injected object has not the region configured properly as shown in the following image

image

Sample Add the properties

cloud.aws.sqs.endpoint=http://localhost:4566
cloud.aws.sqs.region=sa-east-1

The bean configuration class

@Configuration
public class AwsConfig {

    @Bean
    public QueueMessagingTemplate queueMessagingTemplate(AmazonSQSAsync amazonSQSAsync) {
        return new QueueMessagingTemplate(amazonSQSAsync);
    }
}

To work around this I did the solution from this issue #790