diff options
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 23 |
1 files changed, 17 insertions, 6 deletions
@@ -34,6 +34,7 @@ documentation, please see readthedocs and/or python's inline help. >>> pip install kafka-python + KafkaConsumer ************* @@ -78,6 +79,7 @@ that expose basic message attributes: topic, partition, offset, key, and value: >>> # Get consumer metrics >>> metrics = consumer.metrics() + KafkaProducer ************* @@ -124,6 +126,7 @@ for more details. >>> # Get producer performance metrics >>> metrics = producer.metrics() + Thread safety ************* @@ -133,14 +136,20 @@ KafkaConsumer which cannot. While it is possible to use the KafkaConsumer in a thread-local manner, multiprocessing is recommended. + Compression *********** -kafka-python supports gzip compression/decompression natively. To produce or consume lz4 -compressed messages, you should install python-lz4 (pip install lz4). -To enable snappy compression/decompression install python-snappy (also requires snappy library). -See <https://kafka-python.readthedocs.io/en/master/install.html#optional-snappy-install> -for more information. +kafka-python supports the following compression formats: + +- gzip +- LZ4 +- Snappy +- Zstandard (zstd) + +gzip is supported natively, the others require installing additional libraries. +See <https://kafka-python.readthedocs.io/en/master/install.html> for more information. + Optimized CRC32 Validation ************************** @@ -148,7 +157,9 @@ Optimized CRC32 Validation Kafka uses CRC32 checksums to validate messages. kafka-python includes a pure python implementation for compatibility. To improve performance for high-throughput applications, kafka-python will use `crc32c` for optimized native code if installed. -See https://pypi.org/project/crc32c/ +See <https://kafka-python.readthedocs.io/en/master/install.html> for installation instructions. +See https://pypi.org/project/crc32c/ for details on the underlying crc32c lib. + Protocol ******** |