All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.pythagoras.messagebus.adapter.awssnssqs.config.Properties Maven / Gradle / Ivy

There is a newer version: 1.8.3
Show newest version
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