How to get an UnknownTopicOrPart error when producing to a non-existent topic? #4854
Unanswered
ilyaaxenov
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have disabled the
auto.create.topics.enable
option in the Kafka cluster (set to false) and set a 10-second timeout for producing messages (transaction.timeout.ms
). When I try to produce a message, I receive a "Message timed out" error, although I expect an UnknownTopicOrPart error instead.I found out that if the
topic.metadata.propagation.max.ms
parameter is set to a value at least one second less thantransaction.timeout.ms
, I get the expected error message.I have a few questions since this is not obvious to me from the source code:
topic.metadata.propagation.max.ms=0
, does this guarantee that I will 100% receive an UnknownTopicOrPart error? (assuming the produce timeout can be as short as 1 second)topic.metadata.propagation.max.ms=0
? It seems that this parameter works as a delay when producing a message to a non-existent topic. So, the value 0 seems not to be critical.Beta Was this translation helpful? Give feedback.
All reactions