We are using spring-cloud-stream to work with kafka. And I need to add some interval between getting data by consumer from single topic. batch-node is already set as true , also fetch-max-wait, fetch-min-size, max-poll-records are already tuned.
Should I do something with idleEventInterval, or it's wrong way?
You can pause/resume the container as needed (avoiding a rebalance).
Since version 3.1 we expose
org.springframework.cloud.stream.binding.BindingsLifecycleController
which is registered as bean and once injected could be used to control the lifecycle of individual bindings
If you only want to delay for a short time, you can set the container's idleBetweenPolls
property, using a ListenerContainerCustomizer
bean.