Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

While existing APIs remain unchanged a new API DeleteGroups is introduced to remove offsets of the given group(s) from the internal offset cache. A deleteGroups() functionality will also be introduced in AdminClient API.

Proposed Changes

A new API is introduced for deleting consumer groups:

Code Block
DeleteGroups Request (Version: 0) => [group_id] 
  group_id => STRING
 
DeleteGroups Response (Version: 0) => [group_error_codes]
  throttle_time_ms => INT32
  error_code => INT16
  group_error_codes => group error_code 
    group_id => STRING
    error_code => INT16
FieldDescription
group_idThe unique group identifier
throttle_time_msDuration in milliseconds for which the request was throttled due to quota violation (Zero if the request did not violate any quota)
error_codeResponse error code
group_error_codes 
group_idThe unique group identifier
error_code

Error code corresponding to the individual group_id

 

In addition to this new API, we define the necessary operation/resource permission to use the API as Delete/Group. In other words, when SASL authentication is enabled a user needs to have Delete operation access to a group in order to delete it.

Potential error codes returned by the API (at the top level or per-group level or both) include:

  • 0: None
  • 15: COORDINATOR_NOT_AVAILABLE
  • 24: INVALID_GROUP_ID
  • 30: GROUP_AUTHORIZATION_FAILED

Similar to how the consumer group command line tool supports describing a single group at a time, the deletion functionality will be implemented the same way (deleting one group at a time). The protocol and the corresponding AdminClient API, however, supports support deleting multiple groups in one request. The new AdminClient API signature in kafka.admin.AdminClient would be like this:

Code Block
languagescala
def deleteConsumerGroups(groupIds: List[String]): DeleteGroupsResult

DeleteGroupsResult will include the top level as well as per group error codes. It will be derived from a DeleteGroupsResponse class that will be created in org.apache.kafka.common.requests to fully capture the outcome of a DeleteGroups API call from the broker.

Compatibility, Deprecation, and Migration Plan

...