Class ExplicitExchange

  • All Implemented Interfaces:
    Declaration.ExchangeDeclaration

    @ComponentProfile(summary="Explicitly declare a RabbitMQ Exchange",
                      since="4.3.0")
    public class ExplicitExchange
    extends java.lang.Object
    implements Declaration.ExchangeDeclaration
    Declaring an explicit exchange.

    Depending on your RabbitMQ configuration you may wish to explicitly declare an exchange that is not the 'default exchange' when producing messages.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void declare​(com.rabbitmq.client.Channel ch)
      Declare the exchange.
      java.lang.Boolean getDurable()
      Whether or not the exchange should survive a server restart.
      java.lang.String getName()
      The exchange name.
      com.rabbitmq.client.BuiltinExchangeType getType()
      The exchange type.
      java.lang.String name()
      The name of the exchange that was declared.
      void setDurable​(java.lang.Boolean durable)
      Whether or not the exchange should survive a server restart.
      void setName​(java.lang.String name)
      The exchange name.
      void setType​(com.rabbitmq.client.BuiltinExchangeType type)
      The exchange type.
      ExplicitExchange withDurable​(java.lang.Boolean b)  
      ExplicitExchange withName​(java.lang.String s)  
      ExplicitExchange withType​(com.rabbitmq.client.BuiltinExchangeType t)  
      • Methods inherited from class java.lang.Object

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

      • ExplicitExchange

        public ExplicitExchange()
    • Method Detail

      • withType

        public ExplicitExchange withType​(com.rabbitmq.client.BuiltinExchangeType t)
      • setType

        public void setType​(com.rabbitmq.client.BuiltinExchangeType type)
        The exchange type.
      • getType

        public com.rabbitmq.client.BuiltinExchangeType getType()
        The exchange type.
      • getName

        public java.lang.String getName()
        The exchange name.
      • setName

        public void setName​(java.lang.String name)
        The exchange name.
      • getDurable

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

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