Detect Topic not present in metadata after 60sec error early #2796
rajjaiswalsaumya
started this conversation in
General
Replies: 1 comment 5 replies
-
This has nothing to do with Spring. The behavior you are facing is just standard and built-in Apache Kafka client: https://cwiki.apache.org/confluence/display/KAFKA/KIP-286%3A+producer.send%28%29+should+not+block+on+metadata+update. So, consider to adjust that Not sure about You may consider to use |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using Spring's Kafka Template to send data to a Kafka Cluster. The topic in Kafka is created dynamically on the fly by another microservice. We want to detect a case where the event is posted on that topic before its creation in Kafka, which would lead to the topic not being present in metadata after a 60-second error. This error happens on a separate thread and therefore we get a timeout Exception from the LisenableFuture returned by KafkaTemplate. Is there a smart way to detect this error so that we can ignore the message and drop it? Currently due to this issue our pipeline is getting blocked as we cannot ack to those messages and call punctuate till retry is not expired.
Also, the TimoutError thrown does not have any traces of TopicOrPartitionUnknown error in stack trace to be looked at.
Beta Was this translation helpful? Give feedback.
All reactions