I'm trying to connect my python consumer to AWS MSK cluster. how can I do that?
Have an AWS MSK Cluster running I'm trying consume message from the MSK cluster using python and kafka python.
error I'm getting
Traceback (most recent call last):
File "consumer.py", line 23, in <module>
for message in consumer:
File "/home/ubuntu/.local/lib/python3.6/site-packages/kafka/consumer/group.py", line 1193, in __next__
return self.next_v2()
File "/home/ubuntu/.local/lib/python3.6/site-packages/kafka/consumer/group.py", line 1201, in next_v2
return next(self._iterator)
File "/home/ubuntu/.local/lib/python3.6/site-packages/kafka/consumer/group.py", line 1116, in _message_generator_v2
record_map = self.poll(timeout_ms=timeout_ms, update_offsets=False)
File "/home/ubuntu/.local/lib/python3.6/site-packages/kafka/consumer/group.py", line 655, in poll
records = self._poll_once(remaining, max_records, update_offsets=update_offsets)
File "/home/ubuntu/.local/lib/python3.6/site-packages/kafka/consumer/group.py", line 675, in _poll_once
self._coordinator.poll()
File "/home/ubuntu/.local/lib/python3.6/site-packages/kafka/coordinator/consumer.py", line 270, in poll
self.ensure_coordinator_ready()
File "/home/ubuntu/.local/lib/python3.6/site-packages/kafka/coordinator/base.py", line 258, in ensure_coordinator_ready
self._client.poll(future=future)
File "/home/ubuntu/.local/lib/python3.6/site-packages/kafka/client_async.py", line 582, in poll
self._maybe_connect(node_id)
File "/home/ubuntu/.local/lib/python3.6/site-packages/kafka/client_async.py", line 392, in _maybe_connect
conn.connect()
File "/home/ubuntu/.local/lib/python3.6/site-packages/kafka/conn.py", line 429, in connect
if self._try_handshake():
File "/home/ubuntu/.local/lib/python3.6/site-packages/kafka/conn.py", line 508, in _try_handshake
self._sock.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 1077, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
OSError: [Errno 0] Error