Enum StreamCreator.LeaderLocator

java.lang.Object
java.lang.Enum<StreamCreator.LeaderLocator>
com.rabbitmq.stream.StreamCreator.LeaderLocator
All Implemented Interfaces:
Serializable, Comparable<StreamCreator.LeaderLocator>, java.lang.constant.Constable
Enclosing interface:
StreamCreator

public static enum StreamCreator.LeaderLocator extends Enum<StreamCreator.LeaderLocator>
The leader locator strategy.
  • Enum Constant Details

    • CLIENT_LOCAL

      public static final StreamCreator.LeaderLocator CLIENT_LOCAL
      The stream leader will be on the node the client is connected to.

      This is the default value.

    • BALANCED

      public static final StreamCreator.LeaderLocator BALANCED
      The leader will be the node hosting the minimum number of stream leaders, if there are overall less than 1000 queues, or a random node, if there are overall more than 1000 queues.

      Available as of RabbitMQ 3.10.

      Default value for RabbitMQ 3.10+.

    • RANDOM

      public static final StreamCreator.LeaderLocator RANDOM
      The stream leader will be a random node of the cluster.

      Deprecated as of RabbitMQ 3.10, same as BALANCED.

    • LEAST_LEADERS

      public static final StreamCreator.LeaderLocator LEAST_LEADERS
      The stream leader will be on the node with the least number of stream leaders.

      Deprecated as of RabbitMQ 3.10, same as BALANCED.

      Default value for RabbitMQ 3.9.

  • Method Details

    • values

      public static StreamCreator.LeaderLocator[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static StreamCreator.LeaderLocator valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • from

      public static StreamCreator.LeaderLocator from(String value)
    • value

      public String value()