6

I'm new to Kafka, using confluent kafka and trying to write messages to existing kafka topic from AWS EC2 instance using python producer code with 'sasl.mechanism': 'PLAIN','security.protocol': 'SASL_SSL'.I tried the producer example from this link. Getting following error.If any can guide me what would leads to this issue would be great help.

 Failed to deliver message: KafkaError{code=_MSG_TIMED_OUT,val=-192,str="Local: Message timed out"}
marjun
  • 696
  • 5
  • 17
  • 30
  • Did you manage to solve this? – Ivan Peric Apr 10 '21 at 00:45
  • Yes,I have set below properties: producer = KafkaProducer(security_protocol='SASL_SSL',sasl_mechanism = 'PLAIN',ssl_context=self.context,bootstrap_servers='bootstrapServer',sasl_plain_username='username',sasl_plain_password='password',request_timeout_ms=1000000, api_version_auto_timeout_ms=1000000) producer.send('TOPIC_NAME',key=str(msg_key).encode('utf-8'),value=msg_value).get(timeout=180) – marjun Apr 22 '21 at 13:18

0 Answers0