Questions tagged [embedded-kafka]
75 questions
0
votes
0 answers
Embedded Kafka test cases not considered in test case execution
I have added EmbeddedKafka for testing purpose and introduced 3 more Kafka test cases. Total 8 test cases.
When I am running test cases from intellij all test cases are running as expected (all green) 8/8
While executing maven install or test…

StackOverFlow
- 4,486
- 12
- 52
- 87
0
votes
1 answer
Using upgrade.from config in Kafka Streams is causing a "BindException: Address already in use" error in tests using embedded-kafka-schema-registry
I've got a Scala application that uses Kafka Streams - and Embedded Kafka Schema Registry in its integration tests.
I'm currently trying to upgrade Kafka Streams from 2.5.1 to 3.3.1 - and everything is working locally as expected, with all unit and…

katmhicks
- 1
- 2
0
votes
1 answer
Multiple SpringBootTests using EmbeddedKafka fails with "only one 'RetryTopicConfigurationSupport'"
We have an application that makes use of Spring Kafka's non blocking retries via the RetryableTopic annotation.
We are in the middle of upgrading spring-kafka from 2.8.4 to 2.9.0.
We have several SpringBootTests that makes use of EmbeddedKafka. …

jeffl
- 15
- 5
0
votes
1 answer
Spring EmbeddedKafka producer not waiting for consumer acknowledgement
I want the producer in my test to wait until the consumer in the class-under-test has acknowledged by calling Acknowledgement.acknowledge(). My consumer is initialized with the following properties:
spring:
kafka:
consumer:
group-id:…

user2654096
- 71
- 2
- 8
0
votes
1 answer
Trying to test spring + kafka embedded multiple consumers in group
I'm trying to test parallel consumption from 3-paritition topic in kafka. I assumed that all consumers should be able to subscribe and process messages, but I get the exception:
java.lang.IllegalStateException: Failed to be assigned partitions from…

Marko Kraljevic
- 401
- 4
- 19
0
votes
1 answer
Test Kafka consumer using EmbddedKafka fail when launching a batch of tests
I'm testing my Kafka Consumer in Spring Boot. My consumer are similar to the following
@Slf4j
@Component
@RequiredArgsConstructor
public class KafkaPaymentConsumer {
private final PaymentInterface paymentInterface;
@KafkaListener(topics =…

Smaillns
- 2,540
- 1
- 28
- 40
0
votes
2 answers
Error creating bean with name 'embeddedKafka' versions of Kafka
getting:
Error creating bean with name 'embeddedKafka'
Caused by: java.lang.ClassNotFoundException: com.codahale.metrics.Reservoir
2.8.1
2.8.1
springboot version: 2.6.3 -…

YerivanLazerev
- 353
- 3
- 17
0
votes
0 answers
Spring Contracts: Stubs are runnning on port -1 + Failed to construct kafka producer
I have the Consumer test set up with Embedded Kafka and local Maven stubs. Test props set either via application.properties file or @DynamicPropertySource.
@SpringBootTest(
webEnvironment =…

Ivanna
- 11
- 2
0
votes
0 answers
ArrayIndexOutOfBoundsException while reading from dataframe in scala
I'm working on scala streaming unit test but while reading from csv file getting ArrayOutOfBoundsException
Code :
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpecLike
import…

Khilesh Chauhan
- 739
- 1
- 10
- 36
0
votes
1 answer
how to create multiple EmbeddedKafka beans on the same test spec
How to create multiple EmbeddedKafka, right now i have defined two topics on EmbeddedKafka.
@EmbeddedKafka(
partitions = 1,
topics = [Constants.TEST_TOPIC_one, Constants.TEST_TOPIC_two],
controlledShutdown = false,
brokerProperties =…

jcrshankar
- 1,165
- 8
- 25
- 45
0
votes
1 answer
NoClassDefFoundError: scala/collection/convert/AsJavaExtensions
I am creating EmbeddedKafkaCluster in Java test, but getting the following exception, but I have added the kafka_2.12 depedencies which have scala depedencies.
Java version: 11
Added the following depedencies