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

No transaction is available/created if a message handler (Consumer) calls a service annotated with @Transactional

The application is a Spring Boot app with Spring Data JPA and Spring Cloud Stream (RabbitMQ) defined with functional programming model. Functional message handler calls a service: @Configuration class MessageHandlerConfiguration { @Bean …
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
3 answers

Spring Cloud Stream Reactive - Handling Messages exception

I'm currently working on a project in Kotlin that uses rabbit with reactor to receive messages of some DTO type, and dispatch them if they are up to certain criteria. In the process of testing my code, I tried to simulate bad Message input(Since the…
4
votes
1 answer

How can create a producer using Spring Cloud Kafka Stream 3.1

I know how to define a producer using the imperative programming approach but I cannot find how to define a producer using the functional programming approach. I read the Spring Cloud Stream Binder documentation about this, but only found how to…
macmagic
  • 41
  • 1
  • 3
4
votes
1 answer

Spring Cloud Bus/Stream Issues in Spring Cloud 2020.0.0

We have a Spring Boot Microservice that as well as having HTTP endpoints uses Spring Cloud Bus to pick up refresh events (from rabbit) and also has a Spring Cloud Stream Sink that picks up custom messages from another rabbit topic. After updating to…
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…
4
votes
1 answer

Can we use any other database like MariaDB or MongoDB for Storing states in Kafka Streams instead of Rocks DB, is there any way to configure it?

i have a Spring boot Kafka Stream application which process all the incoming events and store it in the State Store which Kafka Streams provides internally and query it using interactive query service. Inside all these Kafka Streams using "RocksDB" …
4
votes
3 answers

Kafka producer fails to send messages with NOT_LEADER_FOR_PARTITION exception

We're using spring-cloud-stream-binder-kafka (3.0.3.RELEASE) to send messages to our Kafka cluster (2.4.1). Every now and then one of the producer threads receives NOT_LEADER_FOR_PARTITION exceptions, and even exceeds the retries (currently set at…
smlgbl
  • 504
  • 2
  • 5
  • 17
4
votes
1 answer

Spring Cloud Stream and Hibernate Validator

Recently, I've been playing with the last version of spring cloud Stream ( using its functional programming style). Although I have read the whole documentation, I could not understand how could I use hibernate Validator in my function. I've read…
Zhozhe
  • 403
  • 2
  • 5
  • 14
4
votes
1 answer

Spring AMQP - How to confirm that a message is delivered and Routed successfully?

I am looking for a way to delivery a message, and once the message is delivered (and routed) successfully, i need to perform some operations. I have enabled publisher confirms and returns…
Jerald Baker
  • 1,121
  • 1
  • 12
  • 48
4
votes
2 answers

Check if StateStore is fully populated

I have a compact topic with approx 30Mio Keys. My App materializes this topic to a KeyValueStore. How can I check if the KeyValueStore is completely populated? If I lookup a key via InteractiveQuery I need to know if the key is not present because…
4
votes
0 answers

How can I silence console output of unhandled exceptions from flows in Spring Cloud Stream?

Using Spring Cloud Stream and the Kafka binder, I have a very simple Processor bound to an SI flow: @Bean @Autowired public IntegrationFlow inputFlow(Thrower thrower) { return IntegrationFlows …
Gabriel Bauman
  • 2,270
  • 1
  • 22
  • 36