Class ExplicitQueue

java.lang.Object
interlok.rabbitmq.ExplicitQueue
All Implemented Interfaces:
Declaration.QueueDeclaration

@ComponentProfile(summary="Explicitly declare a RabbitMQ Queue before use", since="4.3.0") public class ExplicitQueue extends Object implements Declaration.QueueDeclaration
Explicitly configured Queue declaration.

Depending on your RabbitMQ Configuration you may wish to explicitly declare a queue before use. In the absence of any other configuration Interlok assumes that queues should be durable, non-exclusive and should not be automatically deleted if not in use. If your expectations are different then you should definitely configure one of these.

This implementation does not support queue declaration arguments (these are are a Map<String, Object> which is hard to support in configuration).

  • Constructor Details

    • ExplicitQueue

      public ExplicitQueue()
  • Method Details

    • declare

      public void declare(com.rabbitmq.client.Channel ch, String name) throws Exception
      Description copied from interface: Declaration.QueueDeclaration
      Declare the queue.
      Specified by:
      declare in interface Declaration.QueueDeclaration
      Parameters:
      ch - the channel to use to declare the queue.
      name - the name of the queue.
      Throws:
      Exception
    • getDurable

      public Boolean getDurable()
      Whether or not the queue should survive a server restart.
    • setDurable

      public void setDurable(Boolean durable)
      Whether or not the queue should survive a server restart.
    • getExclusive

      public Boolean getExclusive()
      Whether or not the queue is exlusive to the connection.
    • setExclusive

      public void setExclusive(Boolean exclusive)
      Whether or not the queue is exlusive to the connection.
    • getAutoDelete

      public Boolean getAutoDelete()
      Whether or not the queue is deleted when no longer in use.
    • setAutoDelete

      public void setAutoDelete(Boolean autoDelete)
      Whether or not the queue is deleted when no longer in use.