Skip to content

Instantly share code, notes, and snippets.

@DXist
Last active September 1, 2017 11:57
Show Gist options
  • Save DXist/326f16ca971e021f89d8d7d0fa3905e7 to your computer and use it in GitHub Desktop.
Save DXist/326f16ca971e021f89d8d7d0fa3905e7 to your computer and use it in GitHub Desktop.
python-confluent-kafka segmentation fault test
from confluent_kafka import Consumer
import unittest
class MinimalTest(unittest.TestCase):
def test(self):
conf = {
'bootstrap.servers': 'localhost:9092',
'group.id': 'test.py',
'session.timeout.ms': 6000, # commenting this out fixes SegmentationFault
}
kc = Consumer(conf)
kc.subscribe(["test"]) # test topic has some messages
kc.poll(timeout=2)
raise Exception('hi') # we are not closing consumer here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment