confluent kakfa producer KafkaError{code=_MSG_TIMED_OUT,val=-192,str="Local: Message timed out"}
Asked Answered
N

0

9

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"}
Nestornestorian answered 23/3, 2021 at 12:29 Comment(2)
Did you manage to solve this?Overtime
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)Nestornestorian

© 2022 - 2024 — McMap. All rights reserved.