-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- partial list groups API
- Loading branch information
Kindrat
committed
Nov 30, 2015
1 parent
544130a
commit 8dc54e4
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
src/main/java/com/github/nginate/kafka/protocol/messages/request/ListGroupsRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
} |
28 changes: 28 additions & 0 deletions
28
src/main/java/com/github/nginate/kafka/protocol/messages/response/ListGroupsResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |