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
60
votes
2 answers

Spring-Kafka vs. Spring-Cloud-Stream (Kafka)

Using Kafka as a messaging system in a microservice architecture what are the benefits of using spring-kafka vs. spring-cloud-stream + spring-cloud-starter-stream-kafka ? The spring cloud stream framework supports more messaging systems and has…
38
votes
4 answers

Spring boot Test fails saying, Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean

Test Class:- @RunWith(SpringRunner.class) @SpringBootTest(classes = { WebsocketSourceConfiguration.class, WebSocketSourceIntegrationTests.class }, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = { …
Devas
  • 1,544
  • 4
  • 23
  • 28
26
votes
4 answers

@EnableBinding @deprecated as of 3.1 in favor of functional programming model

I see that following annotations are depreciated for Spring Cloud Stream @Input @Output @EnableBinding @StreamListener Please provide examples and links to documentation as how to do it in functional way.
meuhedet meuhedet
  • 465
  • 2
  • 5
  • 9
20
votes
6 answers

Error to serialize message when sending to kafka topic

i need to test a message, which contains headers, so i need to use MessageBuilder, but I can not serialize. I tried adding the serialization settings on the producer props but it did not work. Can someone help me? this…
19
votes
4 answers

A default binder has been requested, but there are no binders available for 'org.springframework.cloud.stream.messaging.DirectWithAttributesChannel'

I am trying to create the simplest as possible hello world with Spring Cloud + Kafka Streams + Spring Boot 2. I realize I miss basic concepts. Basically, I understand that: 1 - I need to define an outbound stream to write messages to a Kafka topic,…
Jim C
  • 3,957
  • 25
  • 85
  • 162
19
votes
5 answers

Kafka INVALID_FETCH_SESSION_EPOCH

We are using a kafka broker setup with a kafka streams application that runs using Spring cloud stream kafka. Although it seems to run fine, we do get the following error statements in our log: 2019-02-21 22:37:20,253 INFO…
mmelsen
  • 636
  • 1
  • 8
  • 24
14
votes
3 answers

Unable to retrieve the requested metadata /latest/meta-data/public-hostname

I'm deploying a springboot application with spring-cloud-stream and binder for AWS Kinesis. The application works fine when is deployed on aws elastic beanstalk if the beanstalk is configured with public ip. When we set beanstalk with private ip,…
11
votes
1 answer

What benefits does Spring AMQP have over Spring Cloud Stream for Microservices Architecture

I use Spring Cloud approach for building few microservices which supposed to interact with each other. For messaging between microservices I intended to use RabbitMQ and Spring AMQP, but after I looked at Spring Cloud Stream I feel lost. In my mind…
Evgeny M
  • 417
  • 7
  • 15
10
votes
2 answers

Tombstone messages not removing record from KTable state store?

I am creating KTable processing data from KStream. But when I trigger a tombstone messages with key and null payload, it is not removing message from KTable. sample - public KStream processRecord(@Input(Channel.TEST)…
R K
  • 382
  • 5
  • 25
9
votes
2 answers

AWS Kafka (MSK) - How to generate Keystore and truststore and use the same in my Spring Cloud Stream application?

Is there any info as to how can I use the AWS MSK details in my Spring Cloud Stream application ? I believe we need to generate a keystore and truststore and then incorporate the same in our application ? I went through the "Client Authentication"…
9
votes
6 answers

Deserialize JSON date format to ZonedDateTime using objectMapper

Background I have the following JSON (message from Kafka) { "markdownPercentage": 20, "currency": "SEK", "startDate": "2019-07-25" } I have the following (JSON schema generated) POJO (I cannot change the POJO as it is shared…
9
votes
3 answers

how to send and receive from the same topic within spring cloud stream and kafka

I have a spring-cloud-stream application with kafka binding. I would like to send and receive a message from the same topic from within the same executable(jar). I have my channel definitions such as below:- public interface ChannelDefinition { …
9
votes
1 answer

spring-cloud-stream request-reply messaging pattern

Is there a request-reply pattern that one should use with spring-cloud-stream? All the documentation I can find on spring-cloud-stream is geared toward the MessageChannel.send fire-and-forget type of producer, and I'm familiar with @MessagingGateway…
gadams00
  • 771
  • 1
  • 10
  • 24
8
votes
1 answer

EnableBinding, Output, Input deprecated Since version of 3.1 of Spring Cloud Stream

Since version 3.1 the major API for working with queues is deprecated. In the class comment it says: Deprecated as of 3.1 in favor of functional programming model I searched a lot in the web for a solution but didn't find a solid E2E explanation…
Rami Loiferman
  • 853
  • 1
  • 6
  • 22
8
votes
5 answers

KTable-KTable foreign-key join not producing all messages when topics have more than one partition

See Update below to show potential workaround Our application consumes 2 topics as KTables, performs a left join, and outputs to a topic. During testing, we found that this works as expected when our output topic has only 1 partition. When we…
1
2 3
99 100