Class ExplicitQueue

  • All Implemented Interfaces:
    Declaration.QueueDeclaration

    @ComponentProfile(summary="Explicitly declare a RabbitMQ Queue before use",
                      since="4.3.0")
    public class ExplicitQueue
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      ExplicitQueue()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void declare​(com.rabbitmq.client.Channel ch, java.lang.String name)
      Declare the queue.
      java.lang.Boolean getAutoDelete()
      Whether or not the queue is deleted when no longer in use.
      java.lang.Boolean getDurable()
      Whether or not the queue should survive a server restart.
      java.lang.Boolean getExclusive()
      Whether or not the queue is exlusive to the connection.
      void setAutoDelete​(java.lang.Boolean autoDelete)
      Whether or not the queue is deleted when no longer in use.
      void setDurable​(java.lang.Boolean durable)
      Whether or not the queue should survive a server restart.
      void setExclusive​(java.lang.Boolean exclusive)
      Whether or not the queue is exlusive to the connection.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExplicitQueue

        public ExplicitQueue()
    • Method Detail

      • declare

        public void declare​(com.rabbitmq.client.Channel ch,
                            java.lang.String name)
                     throws java.lang.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:
        java.lang.Exception
      • getDurable

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

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

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

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

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

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