Questions tagged [embedded-kafka]
75 questions
1
vote
2 answers
NoClassDefFoundError for embedded-kafka in scala project
I'm trying to integrate an embedded kafka in scala 2.11 for my tests.
However I'm getting the following error which I could not understand.
java.lang.NoClassDefFoundError: org/apache/zookeeper/AsyncCallback$MultiCallback
All the versions of kafka…

gabby
- 629
- 2
- 11
- 34
1
vote
1 answer
Spring Kafka 2.9.3 NoClassDefFound - AlterIsrRequest$Builder on EmbeddedKafka Start up
Trying to upgrade the springboot application which uses spring kafka to version 2.9.3 from 2.8.4.
I have followed the instructions here to pulldown kafka-client version 3.2.3 as a separate dependency.
My dependencies looks like…

jeffl
- 15
- 5
1
vote
2 answers
Delete topic using EmbeddedKafkaBroker
I wrote a test class in which I'would test topic deletion
I found for EmbeddedKafkaBroker this method
embeddedKafkaBroker.addTopics("new-topic");
that make me able to create a new topic, but I can't find anything to delete a topic.
So, how can I…

Vin
- 701
- 1
- 9
- 30
1
vote
1 answer
How to send a message with specific offset to EmbeddedKafka in spring boot?
I am writing an integration test for an application that connects to Kafka to consume and publish data and for that purpose I am using EmbeddedKafka. Part of the logic is to consume messages with specific offsets. I want to simulate this, therefore…

Konrad
- 355
- 6
- 18
1
vote
2 answers
Integration test using EmbeddedKafka: ContainerTestUtil.waitForAssignment throws Expected 1 but got 0 partitions
I have written an integration test for my kafka consumer using spring boot, with the spring-kafka libraries. This test uses EmbeddedKafka. A topic with one partition is used. I used the KafkaMessageListener container for this. But I am getting an…

Pavithra Srinivasan
- 13
- 5
1
vote
0 answers
EmbeddedKafka Spring boot test fails only on Github actions but not locally
I am creating a demo application for Groovy using Spring boot with Kafka and elastic.
I used @EmbeddedKafka annotation in my Spock tests and they are working really nice locally; both on Windows and Ubuntu. They work from within Intellij by just…

Matthias
- 1,200
- 2
- 13
- 33
1
vote
1 answer
spring-boot embedded kafka issue : I am getting Invalid receive (size = 369296129 larger than 104857600)
I am writing integration test cases using spring boot, embedded kafka, and temporal. I am trying to send a message on a kafka topic.
@SpringBootTest(classes =…

user3368490
- 21
- 2
1
vote
0 answers
Listener not consuming message on Test with EmbeddedKafka Spring
I was trying to see if a service is invoked when the consumer receives a message from kafka topic but the test is not passing and the consumer is not even receiving the message.
My test:
@SpringBootTest
@DirtiesContext
@EmbeddedKafka(partitions = 1,…

ali
- 11
- 1
1
vote
1 answer
NPE Testing Kafka Producer Using Embedded Kafka
I've written a basic spring boot service that consumes some data via rest API and publishes it to rabbitmq and kafka.
To test the service class handling kafka producing, I followed this guide: https://www.baeldung.com/spring-boot-kafka-testing
In…

Daisy Day
- 652
- 7
- 19
1
vote
0 answers
Embedded Kafka & Spark 2.3 version mismatch issue
When I use this dependency:
net.manub
scalatest-embedded-kafka_2.11
2.0.0
test
With
…

DilTeam
- 2,551
- 9
- 42
- 69
1
vote
1 answer
How to increase RAM for embedded-kafka?
I use embedded-kafka and I have some problems of stable work of it, reflected in:
Connection to node 0 (localhost/127.0.0.1:6001) could not be established. Broker may not be available. and timeouts.
I think that increase of memory can help, but I…

wind
- 892
- 1
- 11
- 27
1
vote
0 answers
EmbeddedKafka/Zookeeper failed to start due to ZkInterruptedException: java.lang.InterruptedException
I'm trying to integrate EmbeddedKafka (https://github.com/spring-projects/spring-kafka/blob/master/src/reference/asciidoc/testing.adoc) with my Unit Tests.
No always but very often I get errors during EmbeddedKafka startup.
2019-10-08T11:23:43.894Z…

Remi
- 766
- 9
- 15
1
vote
2 answers
Spring-cloud-stream MessageConversionException
I have a @StreamListener that accepts a @Payload String.
For testing this Listener class I have written a Junit class using embedded Kafka.
I'm getting below error while running my test class
Error
ERROR o.s.i.handler.LoggingHandler…

Varun V
- 11
- 4
1
vote
1 answer
Application context is reloaded for every Spock specification when using EmbeddedKafka
I have a spring boot application with integration test setup. I have a base groovy class which I extend in every specification. Spring boot version 2.0.6
My problem is that application context is restarted for each specification.
I will appreciate…

Shobhit Tyagi
- 93
- 1
- 9
1
vote
1 answer
How can you verify immediately that a message was acknowledged when integration testing using Embedded Kafka in Spring Cloud Stream?
We use Spring Cloud Stream Kafka Binder (with Project Reactor integration, i.e.
Flux streams)
and manual offset commits
(i.e. autoCommitOffset = false).
We are trying to write an integration test with Embedded Kafka from spring-kafka-test
that's…

Christian
- 6,070
- 11
- 53
- 103