I am trying to enable throttling on a consumer poller.  My understanding of the 
consumer is that it has a single threaded design so that all comms affecting 
the consumer are sent during a client threads call to poll and commitSynch.  We 
have therefor designed our throttling by using the consumer pause, then 
continuing to poll for some duration, and then calling resume.  

1. Is it the case that during that poll, a rebalance could occur and that since 
subscription state is not maintained across consumer balances, when the rest of 
the poll(s) code runs (as the assignment check is done first) this call could 
result in records being returned from the poll? 
2. If so how can I get around this, is there a better way to implement a 
throttle?
3. If I implement throttling in the way I am doing can I reset the offset using 
the smallest offset returned for each TopicPartition and seek?  If I do use 
seek, do I pass in the smallest value per TopicPartition or is it that value 
minus 1?

Thanks,

Tom

Reply via email to