io.pythagoras.messagebus.adapter.awssnssqs.config.Properties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of adapter-sqs-sns Show documentation
Show all versions of adapter-sqs-sns Show documentation
Pythagoras SQS/SNS Adapter for Message Bus
package io.pythagoras.messagebus.adapter.awssnssqs.config;
import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@Component
@ConfigurationProperties(prefix = "messagebus.aws-sqs-sns")
public class Properties {
private String accessKeyId = "";
private String secretAccessKey = "";
private String region = "us-east-1";
private String prefix;
private Integer parallelReceivers = 1;
private DeadLetterQueue deadLetterQueue = new DeadLetterQueue();
public String getAccessKeyId() {
return accessKeyId;
}
public void setAccessKeyId(String accessKeyId) {
this.accessKeyId = accessKeyId;
}
public String getSecretAccessKey() {
return secretAccessKey;
}
public void setSecretAccessKey(String secretAccessKey) {
this.secretAccessKey = secretAccessKey;
}
public String getRegion() {
return region;
}
public void setRegion(String region) {
this.region = region;
}
public String getPrefix() {
if(prefix == null) {
prefix = RandomStringUtils.randomAlphanumeric(8).toUpperCase();
}
return prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
public Integer getParallelReceivers() {
return parallelReceivers;
}
public void setParallelReceivers(Integer parallelReceivers) {
this.parallelReceivers = parallelReceivers;
}
public DeadLetterQueue getDeadLetterQueue() {
return deadLetterQueue;
}
public void setDeadLetterQueue(DeadLetterQueue deadLetterQueue) {
this.deadLetterQueue = deadLetterQueue;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy