Questions tagged [spring-cloud-stream-binder-kafka]

An Apache Kafka Binder for Spring-Cloud Streams.

Documentation: https://cloud.spring.io/spring-cloud-stream-binder-kafka/spring-cloud-stream-binder-kafka.html

Related:

472 questions
7
votes
1 answer

Understanding Spring Cloud Stream Kafka and Spring Retry

I have a Spring Cloud Stream project using the Kafka binder and I'm trying to understand and eventually customize the RetryTemplate used by Cloud Stream. I'm not finding a lot of documentation on how this works, but what I've read leads me to the…
6
votes
1 answer

Why StreamListener is deprecated

I am using Spring Cloud Stream 3.1.2 for KafkaStreams. The programming models are: Functional Programming Imperative Programming The latter one uses annotations as all the other annotations that the Spring is provided to be used. But, it is…
6
votes
2 answers

Why retention.ms of Kaka Streams repartition topic is set to -1 by default? Isn't this infinitely retain messages in repartition topic?

I think it's related to the below links, but I don't understand. https://issues.apache.org/jira/browse/KAFKA-6535 https://issues.apache.org/jira/browse/KAFKA-6150 Kafka Streams deleting consumed repartition records, to reduce disk usage It's…
6
votes
0 answers

Spring Cloud Stream Kafka Multiple Binding

I am using Spring Cloud Stream Kafka binder to consume messages from Kafka. I am able to make my sample work with a single Kafka Binder as below spring: cloud: stream: kafka: binder: consumer-properties:…
6
votes
1 answer

Extremely slow startup of a Spring Cloud Stream Kafka application when using enable.idempotence true

My Scs application has two Kafka producers with this configuration: spring: cloud: function: definition: myProducer1;myProducer2 stream: bindings: myproducer1-out-0: destination: topic1 producer: …
5
votes
1 answer

java.lang.ClassCastException: class java.lang.String cannot be cast to class [B (java.lang.String and [B are in module java.base of loader 'bootstrap

I am using Spring Boot 2.7.0 and Spring Cloud Microservices stack where I'm trying to send the notification though kafka and getting the below error - Error - 2022-06-12 13:18:51.114 INFO [order-service,472b506d2515980c,472b506d2515980c] 21889 ---…
PAA
  • 1
  • 46
  • 174
  • 282
5
votes
1 answer

Spring Cloud @StreamListener condition deprecated what is the alternative

We have multiple applications consumer listening to the same kafka topic and a producer sets the message header when sending message to the topic so specific instance can evaluate the header and process the message.…
5
votes
2 answers

Configuration which allows to disable cloud stream?

I have a spring boot application which has two functionalities Http requests and kafka Messages handling. I want this application to run in mode which is enabled from application.yml i.e if the user wants to enable it only for http requests then…
5
votes
1 answer

How to disable all Kafka related auto configuration from yaml/properties file in spring-boot-2 without removing dependencies?

I have create a spring-boot-2 gradle project, also in build.gradle file i have added Kafka related dependency which given below. dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-zipkin' compile…
4
votes
1 answer

How to write unit test for spring cloud stream function based method?

When I try to test a spring cloud stream function based method, it always happens NullPointerException about InputDestination. I have two questions: It's hard for me to know how to write UT from the official doc. official test doc Besides, how to…
4
votes
0 answers

Setting `client.id` dynamically with Spring Cloud Stream Kafka Streams

I need to set a specific client.id value for Kafka Streams flows with Spring Cloud Stream dynamically. I know that you can set the value statically as follows: spring: cloud: stream: kafka: streams: binder: …
4
votes
1 answer

Wrapping StreamBridge send and JPA save inside a transaction

I am using Spring Boot 2.5.2 and Spring Cloud 2020.0.3. I am attempting to wrap a rest service call which saves a record to a DB using JPA (CrudRepository.save) and then uses StreamBridge to post a message to a Kafka topic using spring-cloud-stream…
4
votes
4 answers

Failed to create topics","exception":"\norg.apache.kafka.common.errors.UnsupportedVersionException

{ "mdc":{ }, "timestamp":"2021-05-11 11:48:04.055", "level":"ERROR", "logger":"org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner", "message":"Failed to create topics", …
4
votes
1 answer

Could not decode json type in spring cloud stream DefaultKafkaHeaderMapper

We are using spring-cloud-stream and planning to upgrade our Kafka version. Our applications using spring-cloud-stream:2.0.0 (spring-kafka 2.1.7) with apache kafka server 1.0.1 and also using spring-cloud-sleuth:2.0.0 for tracking. We are going to…
4
votes
1 answer

Kafka streams GlobalKTable throws Deserialization exception on Tombstone - null value- records

I have a Spring cloud stream based Kafka Streams application where I'm binding a Global KTable to a Compact topic. When I push a Tombstone record to the topic (Non-empty key with null value) - my Kafka streams application fails with Deserialization…
1
2 3
31 32