Skip to content

Tag: spring-cloud-stream

How to add a field from body to a condition

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

what is the use of the property

What will happen If partitionCount ( is greater than 1 and consumer.partitioned ( is false (Using Kafka) Answer In the case of Kafa binder, the property 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