Search in sources :

Example 1 with DeleteGroupsRequest

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())));
}
Also used : DeleteGroupsRequest(org.apache.kafka.common.requests.DeleteGroupsRequest)

Example 2 with DeleteGroupsRequest

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())));
}
Also used : DeleteGroupsRequest(org.apache.kafka.common.requests.DeleteGroupsRequest)

Example 3 with DeleteGroupsRequest

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));
}
Also used : DeleteGroupsRequest(org.apache.kafka.common.requests.DeleteGroupsRequest) Test(org.junit.jupiter.api.Test)

Aggregations

DeleteGroupsRequest (org.apache.kafka.common.requests.DeleteGroupsRequest)3 Test (org.junit.jupiter.api.Test)1