use of org.apache.kafka.common.requests.DeleteGroupsRequest in project starlight-for-kafka by datastax.
the class KafkaRequestHandler method handleDeleteGroupsRequest.
@Override
protected void handleDeleteGroupsRequest(KafkaHeaderAndRequest deleteGroups, CompletableFuture<AbstractResponse> resultFuture) {
checkArgument(deleteGroups.getRequest() instanceof DeleteGroupsRequest);
DeleteGroupsRequest request = (DeleteGroupsRequest) deleteGroups.getRequest();
resultFuture.complete(KafkaResponseUtils.newDeleteGroups(getGroupCoordinator().handleDeleteGroups(request.groups())));
}
use of org.apache.kafka.common.requests.DeleteGroupsRequest in project kop by streamnative.
the class KafkaRequestHandler method handleDeleteGroupsRequest.
@Override
protected void handleDeleteGroupsRequest(KafkaHeaderAndRequest deleteGroups, CompletableFuture<AbstractResponse> resultFuture) {
checkArgument(deleteGroups.getRequest() instanceof DeleteGroupsRequest);
DeleteGroupsRequest request = (DeleteGroupsRequest) deleteGroups.getRequest();
resultFuture.complete(KafkaResponseUtils.newDeleteGroups(getGroupCoordinator().handleDeleteGroups(request.groups())));
}
use of org.apache.kafka.common.requests.DeleteGroupsRequest in project kafka by apache.
the class DeleteConsumerGroupsHandlerTest method testBuildRequest.
@Test
public void testBuildRequest() {
DeleteConsumerGroupsHandler handler = new DeleteConsumerGroupsHandler(logContext);
DeleteGroupsRequest request = handler.buildBatchedRequest(1, singleton(CoordinatorKey.byGroupId(groupId1))).build();
assertEquals(1, request.data().groupsNames().size());
assertEquals(groupId1, request.data().groupsNames().get(0));
}
Aggregations