GH-932: Added zstd compression type
This commit is contained in:
committed by
Gary Russell
parent
a6ac6e3221
commit
5b3b92cdb9
@@ -419,7 +419,7 @@ If a topic already exists with a larger number of partitions than the maximum of
|
||||
|
||||
compressionType::
|
||||
Set the `compression.type` producer property.
|
||||
Supported values are `none`, `gzip`, `snappy` and `lz4`.
|
||||
Supported values are `none`, `gzip`, `snappy`, `lz4`, `zstd`.
|
||||
If you override the `kafka-clients` jar to 2.1.0 (or later), as discussed in the https://docs.spring.io/spring-kafka/docs/2.2.x/reference/html/deps-for-21x.html[Spring for Apache Kafka documentation], and wish to use `zstd` compression, use `spring.cloud.stream.kafka.bindings.<binding-name>.producer.configuration.compression.type=zstd`.
|
||||
+
|
||||
Default: `none`.
|
||||
|
||||
@@ -398,7 +398,7 @@ If a topic already exists with a larger number of partitions than the maximum of
|
||||
|
||||
compression::
|
||||
Set the `compression.type` producer property.
|
||||
Supported values are `none`, `gzip`, `snappy` and `lz4`.
|
||||
Supported values are `none`, `gzip`, `snappy`, `lz4` and `zstd`.
|
||||
If you override the `kafka-clients` jar to 2.1.0 (or later), as discussed in the https://docs.spring.io/spring-kafka/docs/2.2.x/reference/html/deps-for-21x.html[Spring for Apache Kafka documentation], and wish to use `zstd` compression, use `spring.cloud.stream.kafka.bindings.<binding-name>.producer.configuration.compression.type=zstd`.
|
||||
+
|
||||
Default: `none`.
|
||||
|
||||
@@ -121,7 +121,7 @@ public class KafkaProducerProperties {
|
||||
/**
|
||||
* @return compression type {@link CompressionType}
|
||||
*
|
||||
* Set the compression.type producer property. Supported values are none, gzip, snappy and lz4.
|
||||
* Set the compression.type producer property. Supported values are none, gzip, snappy, lz4 and zstd.
|
||||
* See {@link CompressionType} for more details.
|
||||
*/
|
||||
@NotNull
|
||||
@@ -304,11 +304,10 @@ public class KafkaProducerProperties {
|
||||
*/
|
||||
lz4,
|
||||
|
||||
// /** // TODO: uncomment and fix docs when kafka-clients 2.1.0 or newer is the
|
||||
// default
|
||||
// * zstd compression
|
||||
// */
|
||||
// zstd
|
||||
/**
|
||||
* zstd compression.
|
||||
*/
|
||||
zstd,
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1430,7 +1430,8 @@ public class KafkaBinderTests extends
|
||||
final KafkaProducerProperties.CompressionType[] codecs = new KafkaProducerProperties.CompressionType[] {
|
||||
KafkaProducerProperties.CompressionType.none,
|
||||
KafkaProducerProperties.CompressionType.gzip,
|
||||
KafkaProducerProperties.CompressionType.snappy };
|
||||
KafkaProducerProperties.CompressionType.snappy,
|
||||
KafkaProducerProperties.CompressionType.zstd};
|
||||
byte[] testPayload = new byte[2048];
|
||||
Arrays.fill(testPayload, (byte) 65);
|
||||
Binder binder = getBinder();
|
||||
|
||||
Reference in New Issue
Block a user