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
2
votes
1 answer

Will GlobalKTable always have only 1 record per partition key even if topic compaction for records has not kicked in?

I have a Kafka topic that has compaction enabled by setting cleanup.policy=compact. My segment.bytes property is set to a slightly larger values (100Mb) so that my brokers are performing well. If I have a Kafka streams application that is using the…
2
votes
0 answers

How to Handle backpressure in spring cloud steam reactive

I am using Spring Cloud to consume a Kafka topic, do some processing and store the result in a Mongo DB. I noticed that if my consumer is slow in processing that the Memory consumption climbs rapidly until bringing the service down. Further Analysis…
2
votes
0 answers

@StreamListener to inbound a list of messages

I'm currently using @StreamListener to inbound messages one-by-one and then process it in our service class to save it in db. Instead, I want to inbound a list of messages (say 100) at a time and then process it to save all these 100 messages at…
2
votes
2 answers

MessageDispatchingException: Dispatcher has no subscribers

Having a simple Spring Cloud Stream setup. The interface public interface MyKafkaBinding { @Output(PUBLISHER) MessageChannel publisher(); @Input("subscriber") SubscribableChannel…
2
votes
1 answer

There are producer issues with spring cloud stream 3.0

I read about the spring cloud stream 3.0 documents, to understand the new using java.util.function.[Supplier/Function/Consumer] to represent the producers, the consumption and production, consumers, and this should be correct. But I don't understand…
2
votes
1 answer

How to unit test Spring Cloud Stream with Kafka Streams

I've been trying to get Spring Cloud Stream to work with Kafka Streams for a while now, my project uses embedded kafka for testing with Kafka DSL and I used this repository as a base for my test implementation (it itself is a test cases for this…
1
vote
0 answers

What are the configurations needed to connect spring boot app and AWS MSK?

In local Kafka messages are consuming successfully with the below application configuration spring: cloud: stream: kafka: binder: replicationFactor: 1 auto-create-topics: true brokers:…
1
vote
1 answer

I am using functional approach for kafka streams. I want to get health status by checking thread state

My question is similar to following question. I want to check health for Kstream application which is coded through functional approach. Spring Actuator + Kafka Streams - Add kafka stream status to health check endpoint In the above link answers are…
1
vote
1 answer

NullPointerException + org.apache.kafka.common.header.internals.RecordHeader.key

I am getting the following exception on my microservice since my last release. As the exception is not complete (elipise ...), I am not able to make sense out it. As per my understanding kafka records can have null for key (as then RoundRobinStragey…
1
vote
1 answer

How to enable deliveryAttemptHeader to get DefaultErrorHandler retry count when using spring cloud stream kafka

I am using spring-cloud-stream-binder-kafka and have implemented stateful retry using DefaultErrorHandler, I found that by enabling deliveryAttemptHeader of container properties I can access the retry count or deliveryAttempt count from message…
1
vote
1 answer

Spring Cloud Stream Kafka Sreams app in Spring Native / GraalVM image

I've compiled my app containing a Kafka Streams stream with maven -Pnative native profile and start it with -Dspring.aot.enabled=true -Dspring.profiles.active=dev, but the start fails with the following error: Caused by:…
1
vote
1 answer

How to define max.poll.records (SCS with Kafka) over containers

I'm trying to figure out the poll records mechanism for Kafka over SCS in a K8s environment. What is the recommended way to control max.poll.records? How can I poll the defined value? Is it possible to define it once for all channels and then…
1
vote
1 answer

StreamBridge bean not found in Spring context

StreamBridge cannot be injected (using @Autowired) into a service and causes the following error: Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type…
1
vote
0 answers

Spring Cloud Stream Kafka: Specify JSON Type Mappings

I have a Kafka consumer that is implemented using Spring's Kafka Streams API. The consumer looks something like this: @Bean public Consumer> fooProcess() { return input -> input .foreach((key, value) -> { …
1
vote
0 answers

Spring Cloud stream binder kafka DLQ Handling for Batching doesn't work

I am using spring-cloud-stream-binder-kafka version 3.2.6 in my application. I have enabled the batch-mode so that I should get the messages in batches. While handling DLQ scenario I observed that, In my batch if I have 3 messages and if my last…