summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Widman <jeff@jeffwidman.com>2017-10-06 16:34:20 -0700
committerJeff Widman <jeff@jeffwidman.com>2017-10-06 23:40:09 -0700
commit23e6a1afdaff57fbe8134197eebfaa95628f15f5 (patch)
tree2b59904b76fd8a11c067ec53c339ee804309e91c
parent23c1d5a3e798c811292bfd37d3812a6fc68cab19 (diff)
downloadkafka-python-23e6a1afdaff57fbe8134197eebfaa95628f15f5.tar.gz
Document metrics interface in readme
-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
*********