-
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 coordinator API
- Loading branch information
Kindrat
committed
Nov 29, 2015
1 parent
6c49fd2
commit 7a516a9
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...main/java/com/github/nginate/kafka/protocol/messages/request/GroupCoordinatorRequest.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,23 @@ | ||
package com.github.nginate.kafka.protocol.messages.request; | ||
|
||
import com.github.nginate.kafka.protocol.messages.Request; | ||
import com.github.nginate.kafka.protocol.types.Type; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
import static com.github.nginate.kafka.protocol.types.TypeName.STRING; | ||
|
||
/** | ||
* The offsets for a given consumer group are maintained by a specific broker called the group coordinator. i.e., a | ||
* consumer needs to issue its offset commit and fetch requests to this specific broker. It can discover the current | ||
* coordinator by issuing a group coordinator request. | ||
*/ | ||
@Data | ||
@Builder | ||
//@ApiKey(ApiKeys.) FIXME | ||
@EqualsAndHashCode(callSuper = true) | ||
public class GroupCoordinatorRequest extends Request { | ||
@Type(STRING) | ||
private String groupId; | ||
} |
24 changes: 24 additions & 0 deletions
24
...in/java/com/github/nginate/kafka/protocol/messages/response/GroupCoordinatorResponse.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,24 @@ | ||
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.INT32; | ||
import static com.github.nginate.kafka.protocol.types.TypeName.STRING; | ||
|
||
@Data | ||
//@ApiKey(ApiKeys.) FIXME | ||
@EqualsAndHashCode(callSuper = true) | ||
public class GroupCoordinatorResponse extends Response { | ||
@Type(INT16) | ||
private Short errorCode; | ||
@Type(INT32) | ||
private Integer coordinatorId; | ||
@Type(STRING) | ||
private String coordinatorHost; | ||
@Type(INT32) | ||
private Integer coordinatorPort; | ||
} |