summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/README.rst b/README.rst
index 28cb7e7..a82573b 100644
--- a/README.rst
+++ b/README.rst
@@ -117,6 +117,10 @@ for more details.
>>> for i in range(1000):
... producer.send('foobar', b'msg %d' % i)
+>>> # Include record headers. The format is list of tuples with string key
+>>> # and bytes value.
+>>> producer.send('foobar', value=b'c29tZSB2YWx1ZQ==', headers=[('content-encoding', b'base64')])
+
>>> # Get producer performance metrics
>>> metrics = producer.metrics()