Class BindingInfo

java.lang.Object
org.acemq.rabbitmq.admin.BindingInfo

public final class BindingInfo extends Object
A binding: the rule joining an exchange to a queue or to another exchange.

Invisible to AMQP entirely. There is no way to ask a broker what is bound to what, which is why a topology plan over AMQP reports every binding as a creation and why "nothing is bound for this routing key" is discovered by publishing and being refused.

  • Constructor Details

  • Method Details

    • source

      public String source()
      Returns:
      the exchange messages come from. Empty for the implicit binding every queue has to the default exchange under its own name, which is not a binding anybody made and cannot be removed
    • vhost

      public String vhost()
    • destination

      public String destination()
      Returns:
      the queue or exchange messages go to
    • destinationType

      public String destinationType()
      Returns:
      queue or exchange
    • routingKey

      public String routingKey()
      Returns:
      the routing key or pattern
    • arguments

      public Map<String,Object> arguments()
      Returns:
      the binding arguments, which is where a headers exchange keeps its matching rules
    • isDefaultExchangeBinding

      public boolean isDefaultExchangeBinding()
      Returns:
      whether this is the unremovable default-exchange binding rather than a real one
    • propertiesKey

      public String propertiesKey()
      The broker's identifier for this binding, needed to delete it.

      A binding has no name. Several may join the same pair of objects with different routing keys and arguments, so the delete URL identifies one by this key rather than by anything a caller chose.

      It arrives already percent-encoded. A routing key of a.# has a properties key of a.%23, and it belongs in the URL exactly as given — encoding it again produces a.%2523, which matches nothing and 404s. This is why RabbitAdmin.unbind(BindingInfo) takes the whole object rather than a routing key: reconstructing this string correctly is not something a caller should have to know about.

      Returns:
      the properties key, or null if the broker did not send one
    • toString

      public String toString()
      Overrides:
      toString in class Object