apache / pulsar-client-go

Apache Pulsar Go Client Library
https://pulsar.apache.org/
Apache License 2.0
650 stars 334 forks source link

[feature request] Support SNAPPY CompressionType #936

Open shibd opened 1 year ago

shibd commented 1 year ago

Motivation

As the title says. In go client, Snappy compression is not yet supported.

https://github.com/apache/pulsar-client-go/blob/77c7ccbd144b00d17c320c5f67cadaedb53f6b1e/pulsar/producer.go#L38-L43

nodece commented 1 year ago

Snappy depends on cgo, we should avoid using cgo.

wolfstudy commented 1 year ago

The current zstd compression algorithm also calls cgo to achieve better performance. If we have enough evidence to prove that the compression performance of SNAPPY will be better in cgo mode, we welcome to contribute this function.

https://github.com/apache/pulsar-client-go/blob/master/pulsar/internal/compression/zstd_cgo.go