Questions tagged [spring-cloud-stream-binder]

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

why kafka listener annotated with @StreamListener behaving different then kafka listener implements Consumer Interface?

we are upgrading spring boot 2.2.6.release to 2.7.8 and facing below issue on Kafka listener. Scenario -1: Previously we were using SCS 3.0.4.Release and using @StreamListener to consume Kafka messages. we have below one scenario where one single…
2
votes
1 answer

How to use Spring Cloud Stream producer property to set the partition of a message in functional outbound channel?

I have a very simple application that uses the functional approach to consume messages from a Kafka topic, process their payloads and send them to a different topic. I am using Spring Boot 2.7.5 and Spring Cloud Starter Stream Binder Kafka 3.2.6…
2
votes
1 answer

Is it a problem if I set spring.json.trusted.packages = '*' while consuming data in Spring Cloud Stream?

I am using Spring Cloud Stream in my project. I haven't started consuming with functional stream yet. I'm still consuming data with @StreamListener. I also consume the data as batch. Since I consume the data as batch, I have to give deserializer. I…
1
vote
1 answer

Spring Cloud Stream test-binder OutputDestination does not consume events

We use microservices and event driven architecture(more particular choreography). We use kafka and many services use Spring Cloud Stream as an abstraction over the message brokers. After upgrading our Spring Cloud Stream related source to the new…
1
vote
1 answer

What is the performance difference between using StreamBridge and defining MessageChannel bindings using the EnableBinding annotation?

This is the current approach suggested in the docs for producers in foreign event driven applications: @Autowired StreamBridge streamBridge; .... bridge.send("binding1" , message); bridge.send("binding2" , message); The previous approach using…
1
vote
1 answer

Spring RabbitMQ binder: does partition producer use multiple channels to publish messages routed to one of queue partitions?

We're using Spring RabbitMQ Binder to partition queue. We're consuming queue and then based on the our implementation of PartitionKeyExtractorStrategy we send messages to queue partitions. It is important for us that messages which get into queue…
1
vote
1 answer

renew message lock on Azure Bus in Spring application

We have an application that uses the Spring Cloud Azure Stream Binder to consume messages from the Azure Bus. Our consumer looks like the one in the official documentation: import com.azure.spring.messaging.checkpoint.Checkpointer; [...] import…
1
vote
1 answer

class [B cannot be cast to class java.util.List ([B and java.util.List are in module java.base of loader 'bootstrap')

I got this error when i try to consume records from kinesis: class [B cannot be cast to class java.util.List ([B and java.util.List are in module java.base of loader 'bootstrap') so it looks like the payload is coming in another type or so. Note: if…
1
vote
0 answers

Set a custom message header id when producing messages with Spring Cloud Stream Binder for Azure Event Hubs

I am using the spring cloud stream event binder for Azure event hubs and follow the setup in this tutorial. Now I want to set a custom value to the id Header of the message produced. I know that those headers are read only in the Spring Message…
1
vote
1 answer

Message getting redelivered to RabbitMQ consumer setup using spring cloud stream

We have a SpringBoot service implementation in which we are using delayed messaging with the below setup: Initial queue (Queue 1) that gets the message has a TTL set, the queue also has a dead letter exchange mentioned with a specific dead letter…
1
vote
0 answers

Spring Cloud Kafka Stream Multibinder BeanCreationException: Error creating bean with name 'kafkaStreamsFunctionProcessorInvoker'

I am trying to create a spring boot application using spring cloud kafka stream which reads input from kafka cluster 1 and send it to kafka cluster 2 using single kafkastream application. I am getting following exception during…
1
vote
0 answers

Spring Cloud Stream Kafka Binder Async Producer error handling and handle retries

I am using Spring Cloud Stream Kafka Binder to produce message into Kafka. I have kept producer sync to false. spring.cloud.stream.kafka.bindings..producer.sync: false I faced one issue while producing asynchronously to Kafka, some…
0
votes
1 answer

Spring Cloud Stream Rabbit error starting using ssl

I'm trying to connect with rabbitmq from aws (AmazonMQ) using Spring cloud Stream, and spring-cloud-stream-binder-rabbit using ssl, but I get an error when starting the application, I don't need to import certificates from aws, because they are…
0
votes
1 answer

Not able to publish and consume message with spring-cloud-stream-test-binder:4.0.4

I am using spring-cloud-stream-test-binder with version 4.0.4 But while publishing/consuming i am getting below error java.lang.NullPointerException: Cannot invoke…
1
2 3 4