From 97261f491d02fb7f72ba30abcfc26240f520a9b4 Mon Sep 17 00:00:00 2001 From: Linus Wallgren Date: Thu, 18 May 2017 22:49:20 +0200 Subject: Describe consumer thread-safety --- docs/index.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'docs') diff --git a/docs/index.rst b/docs/index.rst index 18f0721..550d246 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -109,6 +109,16 @@ client. See `KafkaProducer `_ for more details. ... producer.send('foobar', b'msg %d' % i) +Thread safety +************* + +The KafkaProducer can be used across threads without issue, unlike the +KafkaConsumer which cannot. + +While it is possible to use the KafkaConsumer in a thread-local manner, +multiprocessing is recommended. + + Compression *********** -- cgit v1.2.1