Questions tagged [spring-cloud-stream]

Spring Cloud Stream allows a user to develop and run messaging microservices using Spring Integration and run them locally, or in the cloud, or even on Spring Cloud Data Flow. Just add @EnableBinding and run your app as a Spring Boot app (single application context). You just need to connect to the physical broker for the bus, which is automatic if the relevant bus implementation is available on the classpath.

Use this tag for questions about the Spring Cloud Stream project. It is not intended for general questions about integrating other Spring projects with other technologies.

Spring Cloud Stream's Official Project Site

Spring Cloud Stream's Github Repo

How to contribute

Related tags , , .

2724 questions
4
votes
1 answer

Spring Cloud Streams - Multiple dynamic destinations for sources and sinks

There was a change request on my system, which currently listens to multiple channels and send messages to multiple channels as well, but now the destination names will be in the database and change any time. I'm having trouble believing I'm the…
4
votes
2 answers

Spring Cloud Stream Kafka - Method must be Declarative

I have configured a spring boot based application with spring cloud stream. I am trying to work on a KStream but I keep getting error "java.lang.IllegalArgumentException: Method must be declarative". Can someone help me understand how do I get this…
srini
  • 544
  • 1
  • 11
  • 23
4
votes
1 answer

Spring Cloud Stream Reactive - How to do the Error Handling in case of reactive stream pipeline?

How to do the error handling for the reactive stream pipeline. Like Application Error Handling (ex: errorChannel) System Error Handling (working with DLQ, reprocessing etc) The current documentation only describes error handling for the…
4
votes
2 answers

Spring Cloud Stream Reactive - which kafka-binder is appropriate in case of reactive stream pipeline?

We are using reactive spring cloud stream with the Kafka. Any suggestions on using the right binder? which one is most suitable for the reactive pipeline? spring-cloud-stream-binder-kafka spring-cloud-stream-binder-kafka-streams Obviously, we…
4
votes
2 answers

jackson cannot deserialize (spring cloud stream kafka)

I am trying to read a json message from kafka and got an exception, which says Jackson cannot deserialize the json to POJO. The json is like {"code":"500","count":22,"from":1528343820000,"to":1528343880000}, which is an output of kafka stream. The…
ccshih
  • 1,190
  • 3
  • 17
  • 25
4
votes
1 answer

How to unit test Spring Cloud Stream with Kafka DSL

I am trying to (unit) test a Spring Cloud Stream Kafka processor that uses Kafka DSL, but receives the following error "Connection to node -1 could not be established. Broker may not be available.". Besides, the test does not shut down. I tried both…
HL'REB
  • 838
  • 11
  • 17
4
votes
2 answers

Multiple bindingRoutingKey's for a consumer with Spring Cloud Stream using RabbitMQ

I'd like to configure an input channel in Spring Cloud Stream to be bound to the same exchange (destination) with multiple routing keys. I've managed to get this working with a single routing key like this: spring: cloud: stream: …
Johan
  • 37,479
  • 32
  • 149
  • 237
4
votes
1 answer

Getting Kafka Streams Class Cast Exception on the same Class while applying map function

UserRecord.java (autogenerated by Maven Avro plugin) UserRecord extends SpecificRecordBase implement SpecificRecord UserRecordSerde.java UserRecordSerde extends SpecificAvroSerde application.yml spring.cloud.stream.bindings.input.destination:…
R K
  • 382
  • 5
  • 25
4
votes
1 answer

How does json String to Object auto conversion works in Spring cloud Stream?

I am looking at this example - https://github.com/spring-cloud/spring-cloud-stream-samples/blob/master/kafka-streams-samples/kafka-streams-product-tracker/src/main/java/kafka/streams/product/tracker/KafkaStreamsProductTrackerApplication.java Trying…
R K
  • 382
  • 5
  • 25
4
votes
1 answer

AWS kinesis consumer with Java and Spring

I want to write an AWS kinesis stream consumer in a Spring boot application. And I'm not sure if Spring has a native support of kinesis, or I have to use the kinesis client library. According to this blog post…
4
votes
3 answers

How to remove the content type header from kafka messages produced by the spring cloud stream app starter sources

For twitter source it is creating a 30 bit header for each kafka messages if we use custom kafka consumer other than @StreamListener (Sink). @StreamListener sends the messages correctly to the annotated method (no header). The problem is for each…
Devas
  • 1,544
  • 4
  • 23
  • 28
4
votes
0 answers

How do I convert values from environment variables from string to int to use as application properties in my Spring Boot application?

I have a dockerized Spring Cloud Stream service, and I'm trying to read values for instanceCount and instanceIndex from environment variables set on the virtual machine on which the service is running. I have a class marked with the…
4
votes
1 answer

How to assign a specific kafka consumer to a specific partition

I have a "topic" with 2 partitions. topic-0 topic-1 And I have 2 input message channels input0 input1 with same destination "topic" and same group. My understanding is that, since it is a same group each topic will be automatically assigned a…
RSM
  • 423
  • 3
  • 7
  • 20
4
votes
3 answers

spring cloud stream kafka: "Dispatcher has no subscribers" error

I am testing spring cloud stream with kafka binder, but got an error Caused by: org.springframework.messaging.MessageDeliveryException: Dispatcher has no subscribers for channel 'unknown.channel.name'.; pom.xml
ccshih
  • 1,190
  • 3
  • 17
  • 25
4
votes
5 answers

Failed to start bean 'inputBindingLifecycle' when using spring-boot:1.5.1 and spring-cloud-stream

I get the below mentioned error when using spring-boot:1.5.1 but not when using spring-boot:1.4.4 Has anyone encountered this? package org.test; import lombok.Data; import lombok.ToString; import org.springframework.boot.SpringApplication; import…
Ajay
  • 465
  • 1
  • 9
  • 22