Class RemoveMembersFromConsumerGroupHandler
java.lang.Object
org.apache.kafka.clients.admin.internals.AdminApiHandler.Batched<CoordinatorKey,Map<org.apache.kafka.common.message.LeaveGroupRequestData.MemberIdentity,org.apache.kafka.common.protocol.Errors>>
org.apache.kafka.clients.admin.internals.RemoveMembersFromConsumerGroupHandler
- All Implemented Interfaces:
AdminApiHandler<CoordinatorKey,Map<org.apache.kafka.common.message.LeaveGroupRequestData.MemberIdentity, org.apache.kafka.common.protocol.Errors>>
public class RemoveMembersFromConsumerGroupHandler
extends AdminApiHandler.Batched<CoordinatorKey,Map<org.apache.kafka.common.message.LeaveGroupRequestData.MemberIdentity,org.apache.kafka.common.protocol.Errors>>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.kafka.clients.admin.internals.AdminApiHandler
AdminApiHandler.ApiResult<K,V>, AdminApiHandler.Batched<K, V>, AdminApiHandler.RequestAndKeys<K>, AdminApiHandler.Unbatched<K, V> -
Constructor Summary
ConstructorsConstructorDescriptionRemoveMembersFromConsumerGroupHandler(String groupId, List<org.apache.kafka.common.message.LeaveGroupRequestData.MemberIdentity> members, org.apache.kafka.common.utils.LogContext logContext) -
Method Summary
Modifier and TypeMethodDescriptionapiName()Get a user-friendly name for the API this handler is implementing.org.apache.kafka.common.requests.LeaveGroupRequest.BuilderbuildBatchedRequest(int coordinatorId, Set<CoordinatorKey> groupIds) AdminApiHandler.ApiResult<CoordinatorKey, Map<org.apache.kafka.common.message.LeaveGroupRequestData.MemberIdentity, org.apache.kafka.common.protocol.Errors>> handleResponse(org.apache.kafka.common.Node coordinator, Set<CoordinatorKey> groupIds, org.apache.kafka.common.requests.AbstractResponse abstractResponse) Callback that is invoked when a request returns successfully.Get the lookup strategy that is responsible for finding the brokerId which will handle each respective key.static AdminApiFuture.SimpleAdminApiFuture<CoordinatorKey, Map<org.apache.kafka.common.message.LeaveGroupRequestData.MemberIdentity, org.apache.kafka.common.protocol.Errors>> Methods inherited from class org.apache.kafka.clients.admin.internals.AdminApiHandler.Batched
buildRequestMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.kafka.clients.admin.internals.AdminApiHandler
handleUnsupportedVersionException
-
Constructor Details
-
RemoveMembersFromConsumerGroupHandler
-
-
Method Details
-
apiName
Description copied from interface:AdminApiHandlerGet a user-friendly name for the API this handler is implementing. -
lookupStrategy
Description copied from interface:AdminApiHandlerGet the lookup strategy that is responsible for finding the brokerId which will handle each respective key.- Returns:
- non-null lookup strategy
-
newFuture
public static AdminApiFuture.SimpleAdminApiFuture<CoordinatorKey,Map<org.apache.kafka.common.message.LeaveGroupRequestData.MemberIdentity, newFutureorg.apache.kafka.common.protocol.Errors>> (String groupId) -
buildBatchedRequest
public org.apache.kafka.common.requests.LeaveGroupRequest.Builder buildBatchedRequest(int coordinatorId, Set<CoordinatorKey> groupIds) -
handleResponse
public AdminApiHandler.ApiResult<CoordinatorKey,Map<org.apache.kafka.common.message.LeaveGroupRequestData.MemberIdentity, handleResponseorg.apache.kafka.common.protocol.Errors>> (org.apache.kafka.common.Node coordinator, Set<CoordinatorKey> groupIds, org.apache.kafka.common.requests.AbstractResponse abstractResponse) Description copied from interface:AdminApiHandlerCallback that is invoked when a request returns successfully. The handler should parse the response, check for errors, and return a result which indicates which keys (if any) have either been completed or failed with an unrecoverable error. It is also possible that the response indicates an incorrect target brokerId (e.g. in the case of a NotLeader error when the request is bound for a partition leader). In this case the key will be "unmapped" from the target brokerId and lookup will be retried. Note that keys which received a retriable error should be left out of the result. They will be retried automatically.- Parameters:
coordinator- the broker that the associated request was sent togroupIds- the set of keys from the associated requestabstractResponse- the response received from the broker- Returns:
- result indicating key completion, failure, and unmapping
-