Class Address


public class Address extends Object
Represents an address for publication of an AMQP message. The AMQP 0-8 and 0-9 specifications have an unstructured string that is used as a "reply to" address. There are however conventions in use and this class makes it easier to follow these conventions, which can be easily summarised as:
Here we also the exchange name to default to empty (so just a routing key will work if you know the queue name).
Mark Pollack, Mark Fisher, Dave Syer, Artem Bilan, Gary Russell
  • Field Details


      public static final String AMQ_RABBITMQ_REPLY_TO
      Use this value in RabbitTemplate#setReplyAddress(String) to explicitly indicate that direct reply-to is to be used.
      See Also:
  • Constructor Details

    • Address

      public Address(String address)
      Create an Address instance from a structured String with the form
      address - a structured string.
    • Address

      public Address(String exchangeName, String routingKey)
      Create an Address given the exchange name and routing key. This will set the exchange type, name and the routing key explicitly.
      exchangeName - The exchange name.
      routingKey - The routing key.
  • Method Details

    • getExchangeName

      public String getExchangeName()
    • getRoutingKey

      public String getRoutingKey()
    • equals

      public boolean equals(Object o)
      equals in class Object
    • hashCode

      public int hashCode()
      hashCode in class Object
    • toString

      public String toString()
      toString in class Object