Versions Compared

Key

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

...

We need to establish some backward-compatibility strategy for the case an old client subscribes a topic using ZStandard, explicitly or implicitly (i.e., 'compression.type' configuration of given topic is 'producer' and the producer compressed the records with ZStandard). After discussion, we decided to support zstd to the new clients only (i.e., uses v2 format) and return UNSUPPORTED_COMPRESSION_TYPE error for the old clients.

Here is the detailed strategy:

  1. Bump produce and fetch request versions. It will give the old clients a message to update their version.
  2. Zstd will only be allowed for the bumped produce API. That is, for older version clients(=below KAFKA_2_1_IV0), we return UNSUPPORTED_COMPRESSION_TYPE regardless of the message format.

  3. Zstd will only be allowed for the bumped fetch API. That is, if

    If

    the requested partition uses zstd and the client version is

    below KAFKA

    below KAFKA_2_1_IV0,

    returns UNSUPPORTED

      we return UNSUPPORTED_COMPRESSION_TYPE

    error

    regardless of the message format. Down-conversion of zstd-compressed records will not be supported.

The following section explains why we chose this strategy.

...