[英]org.apache.kafka.common.errors.UnknownTopicOrPartitionException: This server does not host this topic-partition
Using java
I am sending a json object
to kafka, initially it worked for me for 2 days, now I am getting the following exception
我使用java
将一个json object
发送到kafka,最初它为我工作了2天,现在出现以下exception
Exception in thread "main" java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.UnknownTopicOrPartitionException: This server does not host this topic-partition.
at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.valueOrError(FutureRecordMetadata.java:65)
at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(FutureRecordMetadata.java:52)
at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(FutureRecordMetadata.java:25)
at dummy.DummySyntheticManifestProducer.main(DummySyntheticManifestProducer.java:164)
Caused by: org.apache.kafka.common.errors.UnknownTopicOrPartitionException: This server does not host this topic-partition.
setting the retries
property on the producer settings. 在生产者设置中设置retries
属性。 also need to set the property max.in.flight.requests.per.connection
to 1 还需要将属性max.in.flight.requests.per.connection
设置为1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.