Replies: 4 comments 1 reply
-
Those props are static for the consumer. If we can change them at runtime, we have to restart a listener container to apply new configs. As long as you have enough data in the topic log, those props don't matter: the consumer is going to fetch according config, call listener and come back to other records in the topic. You may consider to use an |
Beta Was this translation helpful? Give feedback.
-
Thx @artembilan our service have try idleBetweenPolls property , as you mentioned it is static config. but that means we need always slow down our consume speed as we set Idle. Also we real do some setting as you share the wiki , I vote we can do more tuning on the fetch.min.bytes we did not turn before |
Beta Was this translation helpful? Give feedback.
-
But I still have another idea want to discuss with you. On normal status not peak time our max.poll.records not always reach the max value , eg we set value = 500 . But at the peak time it will nearly reach 500, so we can think that time is Peak time , if build ratelimit concept can we do delay ack to Kafka to slow down the whole transcation. -cc @artembilan and @garyrussell what's you point |
Beta Was this translation helpful? Give feedback.
-
also @artembilan i checked the function do we have example while we use @KafkaListener condition , then we dynamic refresh consumerConfig without restart as this case defined useful for situations such as credential rotation |
Beta Was this translation helpful? Give feedback.
-
@garyrussell @artembilan
We have one interesting requirement on Consume message with rate limit
On the peak time, we have huge message generate on Kafka server, and if we keep default consume config like
spring.kafka.consumer.max-poll-records=500
spring.kafka.consumer.fetch-max-wait=500
we do some change like below, reducer poll records and change the fetch-max-wait time from 500 to 1000
spring.kafka.consumer.max-poll-records=100
spring.kafka.consumer.fetch-max-wait=1000
if it take effective ,it means it will do some rate limit , am i right? do we have another way to do it with Spring-Kafka
more than that , on peak time to reduce consumer server high cpu we want it consume slowly then back to normal traffic we can recover original consume speed?
I know we can add this topic partition ,and add more consumer node to handle it. but not sure whether we have more effective program way to do dynamic consume
Beta Was this translation helpful? Give feedback.
All reactions