we are trying to up grade springboot from v2.7 to v3.2 , we resolved dependencies issues succesfully. one Integration test is failing which was working fine, this test tries to post a message to a kafka topic
@EmbeddedKafka(partitions = 2, brokerProperties = {"listeners=PLAINTEXT://localhost:9092", "port=9092"}, topics={"topic1","topic2"])
i get the error topic 'topic1' does not exist in metadata after NN ms
due to the below code timing out, we have tried increasing the time out too
ProducerMetadata.java
public synchronized void awaitUpdate(final int lastVersion, final long timeoutMs) throws InterruptedException {
long currentTimeMs = time.milliseconds();
long deadlineMs = currentTimeMs + timeoutMs < 0 ? Long.MAX_VALUE : currentTimeMs + timeoutMs;
time.waitObject(this, () -> {
// Throw fatal exceptions, if there are any. Recoverable topic errors will be handled by the caller.
maybeThrowFatalException();
return updateVersion() > lastVersion || isClosed();
}, deadlineMs);
if (isClosed())
throw new KafkaException("Requested metadata update after close");
}
I debugged through the code and find that the metadata contains the topic i configured, il.e., it is being created
Comment From: wilkinsona
Spring Boot isn't really involved with Kafka at this level. If you believe you have found a bug, please report it to the Spring Kafka project and provide a complete example that reproduces the problem.