com.infusers.core.rabbitmq.RabbitMQProperties Maven / Gradle / Ivy
package com.infusers.core.rabbitmq;
import java.util.ArrayList;
import java.util.List;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@Component
@ConfigurationProperties(prefix = "rabbitmq")
public class RabbitMQProperties {
private List queues = new ArrayList<>();
private ExchangeConfig exchange;
public List getQueues() {
return queues;
}
public void setQueues(List queues) {
this.queues = queues;
}
public ExchangeConfig getExchange() {
return exchange;
}
public void setExchange(ExchangeConfig exchange) {
this.exchange = exchange;
}
public static class QueueConfig {
private String name;
private String routingKey;
private Integer ttl; // Optional TTL value
private String deadLetterExchange; // Optional DLX
public Integer getTtl() {
return ttl;
}
public void setTtl(Integer ttl) {
this.ttl = ttl;
}
public String getDeadLetterExchange() {
return deadLetterExchange;
}
public void setDeadLetterExchange(String deadLetterExchange) {
this.deadLetterExchange = deadLetterExchange;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getRoutingKey() {
return routingKey;
}
public void setRoutingKey(String routingKey) {
this.routingKey = routingKey;
}
}
public static class ExchangeConfig {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy