Thank you for the sample code.
I am trying to use Spring KafkaEmbedded for my Junit test. I tried the test case EmbedKafkaTest.testEmbeddedRawKafka() but it doesn't work. It seems that the producer can't send the message. I got the following exception,
ERROR com.oracle.oal.event.notification.query.eventcollecting.controller.advice.ControllersAdvice - Error in event controller org.apache.kafka.common.errors.UnknownServerException: The server experienced an unexpected error when processing the request
java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.UnknownServerException: The server experienced an unexpected error when processing the request
at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.valueOrError(FutureRecordMetadata.java:70) ~[kafka-clients-0.10.2.1.jar:?]
at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(FutureRecordMetadata.java:57) ~[kafka-clients-0.10.2.1.jar:?]
at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(FutureRecordMetadata.java:25) ~[kafka-clients-0.10.2.1.jar:?]
at
Best regards.
Heidi