use of org.apache.kafka.common.message.DeleteGroupsResponseData in project kafka by apache.
the class DeleteGroupsRequest method getErrorResponse.
@Override
public AbstractResponse getErrorResponse(int throttleTimeMs, Throwable e) {
Errors error = Errors.forException(e);
DeletableGroupResultCollection groupResults = new DeletableGroupResultCollection();
for (String groupId : data.groupsNames()) {
groupResults.add(new DeletableGroupResult().setGroupId(groupId).setErrorCode(error.code()));
}
return new DeleteGroupsResponse(new DeleteGroupsResponseData().setResults(groupResults).setThrottleTimeMs(throttleTimeMs));
}
Aggregations