Class ShovelInfo

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

public final class ShovelInfo extends Object
A shovel: the broker moving messages from one place to another, on its own.

A shovel consumes from a source and republishes to a destination, and either end may be on a different broker. It is how a migration moves a live queue between clusters without the publishers or consumers knowing, which is what acemq-infrastructure is being built around.

A shovel is not a copy. It consumes, so a message it moves is gone from the source. Pointing one at a queue somebody is still reading produces two consumers racing, and the shovel usually wins.

state() is the field to watch. A shovel that cannot reach its destination sits in starting indefinitely, retrying, moving nothing and reporting no error anywhere else.

  • Constructor Details

  • Method Details

    • name

      public String name()
    • vhost

      public String vhost()
    • type

      public String type()
      Returns:
      dynamic for one declared through this API, static for one in the config file
    • state

      public String state()
      Returns:
      running, starting or terminated
    • isRunning

      public boolean isRunning()
      Returns:
      whether it is actually moving messages
    • toString

      public String toString()
      Overrides:
      toString in class Object