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

Spring Cloud Stream multiple function definitions

Is it possible to have reactive SCS application using functional (spring.cloud.function) style with multiple, separate functions / bindings? All examples I have found always register only one functional bean with default bindings input, output. I…
B.Gen.Jack.O.Neill
  • 8,169
  • 12
  • 51
  • 79
6
votes
4 answers

Unable to load AWS credentials from any provider in the chain Spring Cloud Stream Kinesis binder

I am not able to connect to AWS kinesis in Spring Cloud Stream Kinesis binder (1.2.0.RELEASE) without using the default configuration at the system level. Only if the system has already been configured to use the default profile and the access key…
Ali
  • 1,759
  • 2
  • 32
  • 69
6
votes
4 answers

Outbox Pattern - How can we prevent the Message Relay process from generating duplicated messages?

The usual way of implementing the outbox pattern is to store the message payload in an outbox table and have a separate process (the Message Relay) query for pending messages and publish them into a message broker, Kafka in my case. The state of the…
codependent
  • 23,193
  • 31
  • 166
  • 308
6
votes
2 answers

How can we configure value.subject.name.strategy for schemas in Spring Cloud Stream Kafka producers, consumers and KStreams?

I would like to customize the naming strategy of the Avro schema subjects in Spring Cloud Stream Producers, Consumers and KStreams. This would be done in Kafka with the properties key.subject.name.strategy and value.subject.name.strategy ->…
6
votes
3 answers

How can @MessagingGateway be configured with Spring Cloud Stream MessageChannels?

I have developed asynchronous Spring Cloud Stream services, and I am trying to develop an edge service that uses @MessagingGateway to provide synchronous access to services that are async by nature. I am currently getting the following stack…
6
votes
2 answers

Spring Kafka - Event sourcing - Example of how to query some entity state using Kafka + KafkaStreams API

I am using Kafka to implement an architecture based on event sourcing. Suppose I store the events in JSON format: {"name": "ProductAdded", "productId":"1", quantity=3, dateAdded="2017-04-04" } I would like to implement a query to get the quantity…
6
votes
2 answers

How to implement a microservice Event Driven architecture with Spring Cloud Stream Kafka and Database per service

I am trying to implement an event driven architecture to handle distributed transactions. Each service has its own database and uses Kafka to send messages to inform other microservices about the operations. An example: Order service -------> |…
6
votes
6 answers

Spring Cloud Stream dynamic channels

I am using Spring Cloud Stream and want to programmatically create and bind channels. My use case is that during application startup I receive the dynamic list of Kafka topics to subscribe to. How can I then create a channel for each topic?
Nikem
  • 5,716
  • 3
  • 32
  • 59
6
votes
4 answers

Bind RabbitMQ consumer using Spring Cloud Stream to an existing queue

I've created using the RabbitMQ web-UI a topic exchange TX and bind to the exchange two queues TX.Q1 and TX.Q2, each binded with routing-keys rk1 and rk2 accordingly, and produced few messages to the exchange. Now I want to create a consumer using…
Yuval Simhon
  • 1,439
  • 2
  • 19
  • 34
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
1 answer

What does the spring.cloud.stream.source really do?

I am trying to understand how the new functional model of Spring Cloud Streams works and how the configuration actually works under the hood. One of the properties I am unable to figure out is spring.cloud.stream.source. What does this property…
ng.newbie
  • 2,807
  • 3
  • 23
  • 57
5
votes
1 answer

Get Message From Kafka, send to Rsocket and Receive it from React client

I am trying to send data from kafka using Spring cloud stream to Rsocket and then represent data on React Here is my configuration. @Configuration public class RsocketConsumerConfiguration { @Bean public Sinks.Many sender(){ …
5
votes
2 answers

How do a write Test Junit test for messaging with sink and @StreamListener

I have a spring-cloud-stream application with kafka binding. I would like to create a Test Junit. I have my class definitions such as below:- @EnableBinding(Sink.class) @Slf4j public class Messaging { @Autowired private RestTemplate…
Larcenmen
  • 71
  • 1
  • 4
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…