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

ca.gc.aafc.dina.messaging.config.RabbitMQQueueProperties Maven / Gradle / Ivy

There is a newer version: 0.134
Show newest version
package ca.gc.aafc.dina.messaging.config;

import lombok.Getter;
import lombok.Setter;

import org.apache.commons.lang3.StringUtils;

/**
 * Represents the configuration for a single queue.
 *
 * Use with the following annotations:
 * ConfigurationProperties(prefix = "rabbitmq")
 * Component
 * Named if more thant 1 queue is required.
 */
@Getter
@Setter
public class RabbitMQQueueProperties {
  static final String DEAD_LETTER_QUEUE_EXT = ".dlq";

  private String queue;
  private String deadLetterQueue;

  public String getDeadLetterQueue() {
    if (StringUtils.isBlank(deadLetterQueue)) {
      return queue + DEAD_LETTER_QUEUE_EXT;
    }
    return deadLetterQueue;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy