I use the @StreamListener annotation to listen to the topic. How can I add a field from body to the condition? An example of an entity that is sent to the topic: Answer As you can see from version 3.0, you should avoid using filtering based on the message payload. Notice these lines from the documentation: The preceding code is
Tag: spring-cloud-stream
Starting and Stopping an InboundChannelAdapter manually
I’m trying to start an InboundChannelAdapter manually using a @Scheduled function. I think I’m setting up the message payload wrong but I’m not sure what to have it as. Here’s the code: I’m getting this error: The error occurs at the controlBusChannel.send() line and the transformer in the error is the first one that runs after the source. How do
what is the use of the property spring.cloud.stream.bindings..consumer.partitioned
What will happen If partitionCount (spring.cloud.stream.bindings..producer.partitionCount) is greater than 1 and consumer.partitioned (spring.cloud.stream.bindings..consumer.partitioned) is false (Using Kafka) Answer In the case of Kafa binder, the property spring.cloud.stream.bindings..consumer.partitioned is not relevant. You can skip setting this property on the consumer side. This property’s default value is false. Since Kafka has built-in partitioning support, the binder will simply delegate to Kafka broker
How to use avro native decoder when using a PollableMessageSource input in spring cloud stream?
I’m using a PollableMessageSource input to read from a Kafka topic. Messages on that topic are in Avro. use-native-decoding was set to true when those messages were published. This is how I’m polling: …
@StreamListener is not visible when outside main Application class of Spring Boot. What could be the reason?
This is Spring Cloud Stream application. As i mention in the title, the StreamListener annotation works when inside the SpringBootApplication main class, but not when it resides in a different class …
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) …