Enum KafkaNodeRole

java.lang.Object
java.lang.Enum<KafkaNodeRole>
io.strimzi.test.container.KafkaNodeRole
All Implemented Interfaces:
Serializable, Comparable<KafkaNodeRole>

public enum KafkaNodeRole extends Enum<KafkaNodeRole>
Internal: Enum representing the different roles a Kafka node can have in KRaft mode.
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Broker-only node that handles client requests and stores topic data but does not participate in the metadata quorum.
    Combined node that acts as both broker and controller.
    Controller-only node that participates in the metadata quorum but does not handle client requests or store topic data.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the Kafka process.roles configuration value for this node role.
    boolean
    Checks if this node role includes broker functionality.
    boolean
    Checks if this node role includes controller functionality.
    Returns the enum constant of this type with the specified name.
    static KafkaNodeRole[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • COMBINED

      public static final KafkaNodeRole COMBINED
      Combined node that acts as both broker and controller. This is the default behavior and maintains backward compatibility.
    • CONTROLLER

      public static final KafkaNodeRole CONTROLLER
      Controller-only node that participates in the metadata quorum but does not handle client requests or store topic data.
    • BROKER

      public static final KafkaNodeRole BROKER
      Broker-only node that handles client requests and stores topic data but does not participate in the metadata quorum.
  • Method Details

    • values

      public static KafkaNodeRole[] 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 KafkaNodeRole 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
    • getProcessRoles

      public String getProcessRoles()
      Returns the Kafka process.roles configuration value for this node role.
      Returns:
      the process.roles configuration string
    • isController

      public boolean isController()
      Checks if this node role includes controller functionality.
      Returns:
      true if the node can act as a controller, false otherwise
    • isBroker

      public boolean isBroker()
      Checks if this node role includes broker functionality.
      Returns:
      true if the node can act as a broker, false otherwise