Class GroupListing

java.lang.Object
org.apache.kafka.clients.admin.GroupListing

@Evolving public class GroupListing extends Object
A listing of a group in the cluster.
  • Constructor Details Link icon

    • GroupListing Link icon

      public GroupListing(String groupId, Optional<GroupType> type, String protocol, Optional<GroupState> groupState)
      Create an instance with the specified parameters.
      Parameters:
      groupId - Group Id
      type - Group type
      protocol - Protocol
      groupState - Group state
  • Method Details Link icon

    • groupId Link icon

      public String groupId()
      The group Id.
      Returns:
      Group Id
    • type Link icon

      public Optional<GroupType> type()
      The type of the group.

      If the broker returns a group type which is not recognised, as might happen when talking to a broker with a later version, the type will be Optional.of(GroupType.UNKNOWN). If the broker is earlier than version 2.6.0, the group type will not be available, and the type will be Optional.empty().

      Returns:
      An Optional containing the type, if available
    • protocol Link icon

      public String protocol()
      The protocol of the group.
      Returns:
      The protocol
    • groupState Link icon

      public Optional<GroupState> groupState()
      The group state.

      If the broker returns a group state which is not recognised, as might happen when talking to a broker with a later version, the state will be Optional.of(GroupState.UNKNOWN).

      Returns:
      An Optional containing the state, if available.
    • isSimpleConsumerGroup Link icon

      public boolean isSimpleConsumerGroup()
      If the group is a simple consumer group or not.
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object
    • hashCode Link icon

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals Link icon

      public boolean equals(Object o)
      Overrides:
      equals in class Object