Specify SQS region
This commit is contained in:
parent
fedfc66403
commit
ce5f73a5a6
|
@ -32,6 +32,10 @@ public class SqsConfiguration {
|
|||
@JsonProperty
|
||||
private String queueUrl;
|
||||
|
||||
@NotEmpty
|
||||
@JsonProperty
|
||||
private String region = "us-east-1";
|
||||
|
||||
public String getAccessKey() {
|
||||
return accessKey;
|
||||
}
|
||||
|
@ -43,6 +47,10 @@ public class SqsConfiguration {
|
|||
public String getQueueUrl() {
|
||||
return queueUrl;
|
||||
}
|
||||
|
||||
public String getRegion() {
|
||||
return region;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ public class DirectoryQueue {
|
|||
final AWSStaticCredentialsProvider credentialsProvider = new AWSStaticCredentialsProvider(credentials);
|
||||
|
||||
this.queueUrl = sqsConfig.getQueueUrl();
|
||||
this.sqs = AmazonSQSClientBuilder.standard().withCredentials(credentialsProvider).build();
|
||||
this.sqs = AmazonSQSClientBuilder.standard().withRegion(sqsConfig.getRegion()).withCredentials(credentialsProvider).build();
|
||||
}
|
||||
|
||||
public void addRegisteredUser(String user) {
|
||||
|
|
Loading…
Reference in New Issue