In our Spring boot application we use Spring Cloud AWS:
- spring-cloud-starter-aws
- spring-cloud-aws-autoconfigure
- spring-cloud-aws-messaging
to receive messages from a SQS queue. However we need to be able to start the application even if the queue is not accessible (i.e "(Service: AmazonSQS; Status Code: 403; Error Code: AccessDenied"). In order to do that, we need to be able to override the org.springframework.cloud.aws.messaging.config.annotation.SqsConfiguration
class, and provide our own implementation of org.springframework.cloud.aws.messaging.listener.SimpleMessageListenerContainer
.
What is the correct way to do this, and not break autowiring in our existing code?