Skip to content

Commit

Permalink
Add protocol dto classes #5
Browse files Browse the repository at this point in the history
- partial list groups API
  • Loading branch information
Kindrat committed Nov 30, 2015
1 parent 544130a commit 8dc54e4
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.github.nginate.kafka.protocol.messages.request;

import com.github.nginate.kafka.protocol.messages.Request;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
* This API can be used to find the current groups managed by a broker. To get a list of all groups in the cluster, you
* must send ListGroup to all brokers.
*/
@Data
@Builder
//@ApiKey(ApiKeys.) FIXME
@EqualsAndHashCode(callSuper = true)
public class ListGroupsRequest extends Request {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.github.nginate.kafka.protocol.messages.response;

import com.github.nginate.kafka.protocol.messages.Response;
import com.github.nginate.kafka.protocol.types.Type;
import lombok.Data;
import lombok.EqualsAndHashCode;

import static com.github.nginate.kafka.protocol.types.TypeName.INT16;
import static com.github.nginate.kafka.protocol.types.TypeName.STRING;
import static com.github.nginate.kafka.protocol.types.TypeName.WRAPPER;

@Data
//@ApiKey(ApiKeys.) FIXME
@EqualsAndHashCode(callSuper = true)
public class ListGroupsResponse extends Response {
@Type(INT16)
private Short errorCode;
@Type(WRAPPER)
private Group[] groups;

@Data
public static class Group {
@Type(STRING)
private String groupId;
@Type(STRING)
private String protocolType;
}
}

0 comments on commit 8dc54e4

Please sign in to comment.