summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst10
1 files changed, 7 insertions, 3 deletions
diff --git a/README.rst b/README.rst
index 6e9a507..d4fc1a9 100644
--- a/README.rst
+++ b/README.rst
@@ -70,6 +70,8 @@ that expose basic message attributes: topic, partition, offset, key, and value:
>>> for msg in consumer:
... assert isinstance(msg.value, dict)
+>>> # Get consumer metrics
+>>> metrics = consumer.metrics()
KafkaProducer
*************
@@ -110,6 +112,9 @@ for more details.
>>> for i in range(1000):
... producer.send('foobar', b'msg %d' % i)
+>>> # Get producer performance metrics
+>>> metrics = producer.metrics()
+
Thread safety
*************
@@ -122,8 +127,8 @@ 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).
+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.
@@ -138,7 +143,6 @@ leveraged to enable a KafkaClient.check_version() method that
probes a kafka broker and attempts to identify which version it is running
(0.8.0 to 0.11).
-
Low-level
*********