Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Field

Description

ApiKey

This is a numeric id for the API being invoked (i.e. is it a metadata request, a produce request, a fetch request, etc).

ApiVersion

This is a numeric version number for this api. We version each API and this version number allows the server to properly interpret the request as the protocol evolves. Responses will always be in the format corresponding to the request version. Currently the supported version for all APIs is 0.

CorrelationId

This is a user-supplied integer. It will be passed back in the response by the server, unmodified. It is useful for matching request and response between the client and server.

ClientId

This is a user supplied identifier for the client application. The user can use any identifier they like and it will be used when logging errors, monitoring aggregates, etc. For example, one might want to monitor not just the requests per second overall, but the number coming from each client application (each of which could reside on multiple servers). This id acts as a logical grouping across all requests from a particular client.

...

* GROUP_LOAD_IN_PROGRESS (14)
* GROUP_COORDINATOR_NOT_AVAILABLE (15)
* NOT_COORDINATOR_FOR_GROUP (16)
* AUTHORIZATION_FAILED (29)

Constants

Api Keys And Current Versions

The following are the numeric codes that the ApiKey in the request can take for each of the above request types.

API name

ApiKey Value

Current Version

ProduceRequest

0

2

FetchRequest

1

2

OffsetRequest

2

0

MetadataRequest

3

0

Non-user facing control APIs

4-7

 

OffsetCommitRequest

8

2

OffsetFetchRequest

9

1
GroupCoordinatorRequest100
JoinGroupRequest

11

0
HeartbeatRequest120
LeaveGroupRequest130
SyncGroupRequest140
DescribeGroupsRequest150
ListGroupsRequest160
Error Codes

We use numeric codes to indicate what problem occurred on the server. These can be translated by the client into exceptions or whatever the appropriate error handling mechanism in the client language. Here is a table of the error codes currently in use:

...