...
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:
- Bump produce and fetch request versions. It will give the old clients a message to update their version.
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.
Zstd will only be allowed for the bumped fetch API. That is, if
Ifthe requested partition uses zstd and the client version is
below KAFKAbelow KAFKA_2_1_IV0,
returns UNSUPPORTEDwe return UNSUPPORTED_COMPRESSION_TYPE
errorregardless of the message format. Down-conversion of zstd-compressed records will not be supported.
The following section explains why we chose this strategy.
...