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