Category "spring-kafka"

Can one Kafka Producer Class have multiple @EventListener methods?

Im using Spring Kafka and wrote Producer Class @Component @RequiredArgsConstructor class Producer { private static final String TOPIC = "channels"; pri

Can one Kafka Producer Class have multiple @EventListener methods?

Im using Spring Kafka and wrote Producer Class @Component @RequiredArgsConstructor class Producer { private static final String TOPIC = "channels"; pri

Spring Kafka serialiser config

I upgraded from spring-kafka 2.7.2 to 2.8.4. I found my code broke where I had created my serialiser up front in my tests. var serialiser = new KafkaAv

How to stop listening in a Spring Kafka consumer?

I use Spring for Apache Kafka. I'd like to stop listening to my topic and wait to escape OOM. How can I do it?

Unable to send Kafka Avro Message to Message Channel <Failed to convert Generic Message to Outbound Message>

We are trying to push a Kafka notification to the external Kafka Topic by sending the Avro Schema Message to the Message Channel. On sending the message to the

No qualifying bean of type 'org.springframework.kafka.core.ProducerFactory<java.lang.Object, java.lang.Object>'

I use this kafka configuration with spring cloud and spring boot 2.6.6: @Configuration @RefreshScope public class KafkaProducerConfig { @Bean(name = "nativeP

This error handler cannot process 'SerializationException's directly;

The image below is my topic. Every once in a while, a value other than an empty or json is returned. If it is null, it throws an error as below and enters the

How to properly test kafkaTemplate.send() within a function in Junit5?

I'm learning how to write tests and especially tests that have a producer in it. I cannot post all the classes because it's HUGE (and not mine, I should just pr

Missing dependency on EmbeddedKafka on integration test with groovy and spock

I've been trying to create an integration test using the embeddedKafka, but I'm getting problem of missing dependency when trying to run it, this is the error:

How to test Kafka OnFailure callback with Junit?

I have the following code to send data to Kafka: @Service public class KafkaSender{ @Autowired private KafkaTemplate<String, Employee> kafkaTempla

Kafka custom deserializer converting to Java object

I'm using Spring Kafka integration and I've my own value generic serializer/deserializer as shown below Serializer: public class KafkaSerializer<T>

Kafka Producer Thread, huge amound of threads even when no message is send

i currently profiled my kafka producer spring boot application and found many "kafka-producer-network-thread"s running (47 in total). Which would never stop run

Synchronising transactions between database and Kafka producer

We have a micro-services architecture, with Kafka used as the communication mechanism between the services. Some of the services have their own databases. Say

Spring Kafka : Record listener vs Batch listener

With spring-kafka, there is two types of Kafka listeners. Record Listeners : @KafkaListener(groupId = "group1", topics = {"my.topic"}) public void listenSingl

Allowed packages in custom header of Kafka-Message

In spring-kafka, how do I add classes from a package to be trusted as a custom header field? The message is being sent like this: @Autowired private KafkaTemp

Exponential backoff with message order guarantee using spring-kafka

I'm trying to implement a Spring Boot-based Kafka consumer that has some very strong message delivery guarentees, even in a case of an error. messages from a pa

Bean instantiation via factory method failed; exception org.springframework.beans.BeanInstantiationException

I have the following Spring configuration for Kafka: import org.apache.kafka.clients.producer.ProducerConfig; import org.springframework.boot.context.properties

Jackson/Kafka LocalDateTime serialization not working properly

We have a very strange/intermittent issue with kafka and jackson. We have a dto defined which has 4 date field startdate, enddate and a embedded metatdata class

Incompatibility between Spring Kafka consumers with versions 2.3.13.RELEASE and 2.8.3

I am having problems with kafka consumers of applications with different versions of Spring-kafka, specifically between 2.3.13.RELEASE and 2.8.3. When deploying

Incompatibility between Spring Kafka consumers with versions 2.3.13.RELEASE and 2.8.3

I am having problems with kafka consumers of applications with different versions of Spring-kafka, specifically between 2.3.13.RELEASE and 2.8.3. When deploying