clarifications regarding setPollTimeout function. #2362
-
I was researching on how to implement long polling in kafka similar to Amazon SQS which has an attribute called as "ReceiveMessageWaitTimeSeconds". Upon research I found kafka exposes this kind of functionality with consumer.poll(time). I was checking if spring-kafka also has same kind of implementation under the hood or not. Luckily I stumbled upon a thread on stackoverflow and github which confirm my hunch that consumer.poll(time) is similar to setPollTimeout function introduced in spring-kafka 2.3 Here are the links(#248 and https://stackoverflow.com/questions/48402355/spring-kafkalistener-execute-and-poll-records-after-certain-interval. Can you please confirm if my understanding is correct or not? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
The new 2.3 property is |
Beta Was this translation helpful? Give feedback.
setPollTimeout
was not introduced in 2.3, it has been there from day 1 and, yes, that is the property passed toconsumer.poll()
.The new 2.3 property is
idleBetweenPolls
where the polling thread sleeps for that time between calls topoll()
.