Class FederationLinkInfo

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

public final class FederationLinkInfo extends Object
A federation link: an upstream and a policy having actually met.

This is the only proof federation is working. An upstream can be defined and a policy can match and there can still be no link — because the upstream is unreachable, or its credentials are wrong, or the exchange it names does not exist over there. None of those produce an error anywhere a normal deployment would look.

So the useful check is not "is the upstream declared" but "is there a link, and is it running". A link stuck in starting is retrying forever, moving nothing, and reporting itself only here.

  • Constructor Details

  • Method Details

    • upstream

      public String upstream()
      Returns:
      the upstream this link is to
    • vhost

      public String vhost()
    • type

      public String type()
      Returns:
      exchange or queue: what is being federated
    • status

      public String status()
      Returns:
      running, starting or an error state
    • error

      public Optional<String> error()
      Returns:
      why the link is not running, when the broker said. Usually the answer to a question somebody has been asking for a while
    • isRunning

      public boolean isRunning()
      Returns:
      whether messages are actually crossing
    • toString

      public String toString()
      Overrides:
      toString in class Object