Versions Compared

Key

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

...

The idea is to re-use the existing ApiVersions Request to provide the name and the version of the client to the broker. Clients are responsible to provide their name and version.

Broker

ApiVersions Request/Response Handling

The client does not know what ApiVersions versions the brokers support as the ApiVersions is used for this purpose. Today, the client sends an ApiVersionsRequest (AVR) with the latest schema it is aware of. When the broker receives it, it deserializes the AVR with the correct version if it knows it or fail back to version 0 otherwise, and sends back the response with the corresponding version to the client. It means that the broker will ignore any additional information if a newer version is used that it does not know about yet. As an example, if version 4 of AVR would be released and used by the client, the broker wouldn't get the client name and the client version even though they would be passed on the wire.

To circumvent this, we propose to update the logic of the broker to fail back to the latest version it knows instead of using version 0. This is possible if every new version (version N) of the request is always prefixed by its predecessor (version N-1). Oppositely, the client continues to fail back to the oldest version it knows (version 0).


of the request instead of failing back to version 0 when the brokers do not know about the version used to serialise the request. This is possible if every new version (version N) of the request is always prefixed by its predecessor (version N-1). This way, the broker will always be able to leverage the information it is aware of. The broker can send back the response corresponding the the version it has used to parse the request. The client won't be able to parse it with the version it expects but will be able to parse it with version 0 (its failback version).

Validation


Metrics & Log

Client

The client is responsible to provide its name and its version. For the Java client, we will rely on the metadata defined in the `kafka/kafka-version.properties` property file which is shipped in the jar.

...