I needed to use kafka as backend message queue with the gevent web-socket, but it is not working, and giving error, i checked that kafka topics and brokers are working properly, but don't know where the problem could be. please someone help me. i used python-socketio framework for web-socket.
error i am getting on running server1.py is:
Traceback (most recent call last):
File "server1.py", line 16, in <module>
mgr = socketio.KafkaManager(url=url, channel='bingo.sockets')
File "/usr/local/lib/python3.6/site-packages/socketio/kafka_manager.py", line 52, in __init__
self.producer = kafka.KafkaProducer(bootstrap_servers=self.kafka_urls)
File "/usr/local/lib/python3.6/site-packages/kafka/producer/kafka.py", line 383, in __init__
**self.config)
File "/usr/local/lib/python3.6/site-packages/kafka/client_async.py", line 208, in __init__
self._selector = self.config['selector']()
File "/usr/lib64/python3.6/selectors.py", line 399, in __init__
self._epoll = select.epoll()
AttributeError: module 'select' has no attribute 'epoll'
Exception ignored in: <bound method KafkaClient.__del__ of <kafka.client_async.KafkaClient object at 0x7fed7ed59b00>>
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/kafka/client_async.py", line 443, in __del__
self._close()
File "/usr/local/lib/python3.6/site-packages/kafka/client_async.py", line 421, in _close
self._selector.close()
AttributeError: 'KafkaClient' object has no attribute '_selector'
I needed to use kafka as backend message queue with the gevent web-socket, but it is not working, and giving error, i checked that kafka topics and brokers are working properly, but don't know where the problem could be. please someone help me. i used python-socketio framework for web-socket.
error i am getting on running server1.py is:
here i am pasting server1.py code:
Here is the version details of the libraries currently I am using right now: