Questions tagged [embedded-kafka]
75 questions
1
vote
1 answer
How can I test method with @KafkaListener annotation in spring-boot application?
I have a spring component with @KafkaListener method:
@Slf4j
@Component
public class ResponseHandler {
private final ResponseMessageService responseMessageService;
public ResponseHandler(ResponseMessageService responseMessageService) {
…

ip696
- 6,574
- 12
- 65
- 128
1
vote
1 answer
Apache kafka embedded kafka junit test - application starting when I run unit test
I am developing an asynchronous mail server in spring boot using kafka.
I have written tests with embedded kafka which starts its own kafka topic in a random port and use it for testing.
When I started this application context is loading and its…

Codex
- 1,153
- 1
- 20
- 31
1
vote
1 answer
Get data from topic after pushing in @EmbeddedKafka in spring boot Junit
I am writing Junit test cases(using @EmbeddedKafka) for my Spring Boot application which extensively uses Spring-kafka to communicate with other services and for other operations.
One typical case is deleting the data from kafka (which we are doing…

adhikari
- 112
- 2
- 13
1
vote
1 answer
How to add embedded kafka in SpringBoot Application
I am using Kafka and Springboot in my project, Now here I have external Kafka cluster and SpringBoot microservice project.
Using the yml file I successfully create Kafka Producer and consumer and then both application and kafka communicate…

keepmoving
- 1,813
- 8
- 34
- 74
1
vote
0 answers
Embedded Kafka: KTable+KTable leftJoin produces duplicate records
I come seeking knowledge of the arcane.
First, I have two pairs of topics, with one topic in each pair feeding into the other topic. Two KTables are being formed by the latter topics, which are used in a KTable+KTable leftJoin. Problem is, the…

Freestyle076
- 1,548
- 19
- 36
1
vote
1 answer
EmbeddedKafka throwing RecordTooLargeException even though config values are set
I'm trying to increase the default message size of kafka from 1MB to 10MB. I'm testing my new configuration with EmbeddedKafka and ScalaTest but it's not working.
Using this answer I have increased the config values…

Callum
- 869
- 5
- 23
1
vote
1 answer
Integration test Flink and Kafka with scalatest-embedded-kafka
I would like to run integration test with Flink and Kafka. The process is to read from Kafka, some manipulation with Flink and put the datastream in kafka.
I would like to test the process from the begining to the end. For now I use …

Thomas
- 1,164
- 13
- 41
0
votes
0 answers
Failed to create bean with name embeddedKafka , java.lang.NoSuchFieldError: DEFAULT_SOCKET_CONNECTION_SETUP_TIMEOUT_MS
When i import the @EmbeddedKafka and autowire it in the IntegrationTestContext Getting below Exception,
Failed to create bean with name embeddedKafka.
Error Stack Trace:
java.lang.IllegalStateException: Failed to load ApplicationContext
at…

ga7202
- 93
- 8
0
votes
1 answer
EmbeddedKafka without spring boot in Juint5
In Juint5 is this possible to add @EmbeddedKafka without spring-boot? Basically, we wanted to use EmbeddedKafka with spring-core in Juint5.
In the below example, RawKafka is able to start in…

Sounak Saha
- 852
- 1
- 9
- 21
0
votes
1 answer
org.springframework.kafka.KafkaException: Send failed; Topic dpp_cil.dpp.event.external.downstream_response not present in metadata after 60000 ms
Integration test for ProducerServiceIntegrationTest is giving error : org.springframework.kafka.KafkaException: Send failed; nested exception is org.apache.kafka.common.errors.TimeoutException: Topic dpp_cil.dpp.event.external.downstream_response…

Bhavana
- 11
- 1
- 4
0
votes
2 answers
Failed to be assigned partitions from the embedded topics for test
I am using spring boot and spring kafka to write contract test for my @kafkaListener which consume event from one kafka topic.
My test is defined as below:
@EmbeddedKafka(topics = {"abc.abc.topic"})
@ExtendWith(SpringExtension.class)
public class…

Ray
- 477
- 1
- 6
- 18
0
votes
0 answers
Gradle, embedded-kafka: Symbol 'type org.apache.zookeeper.server.ServerCnxnFactory' is missing from the classpath
I am trying to add embedded-kafka to my gradle dependencies.
The build passes, but running a test which uses with EmbeddedKafka gives the following error:
Symbol 'type org.apache.zookeeper.server.ServerCnxnFactory' is missing from the…

gnsb
- 327
- 3
- 8
- 18
0
votes
0 answers
Kafka consumer transaction is slow, how to tweak it?
In a unit test with embeddedkafka, spring-kafka-test 3.0.6, I feel the transaction in consumer is too slow
09:10:11.000 o.s.k.l.KafkaMessageListenerContainer : Received: 1 records[]
09:10:11.100 o.a.k.c.p.internal.TransactionManager : Enqueuing…

jon
- 395
- 1
- 3
- 21
0
votes
0 answers
Kafka consumer doesn't received message within time range after change auto.offset.reset=earliest to latest in embeddedKafka junit test
In a recent common library upgrade, I found Kafka consumer doesn't received message within the expected time(2 minutes). After compared with the code and did lots of tests, looks it is caused by auto.offset.reset=latest(it was earliest). What would…

jon
- 395
- 1
- 3
- 21
0
votes
0 answers
EmbeddedKafka and GraalVM in Springboot tests
I want to use EmbeddedKafka with GraalVM using Spring boot in tests. When I run the test it goes to idle and Waiting until the timeout happens. Is there any idea how to use them together?
When I run the test it goes to idle and Waiting until the…