Actually there is very minimal work done by the thread doing the polling. 
However it is possible that the thread doing the polling may not get schedule 
due to other things happening on the system - like a long GC pause.

From what you all are saying it sounds like a poll will do a heartbeat which 
will cause the consumer to be added back to the consumer group. If that is the 
case then I think I either have a problem with session timeout being hit or an 
issue with the thread doing the poll dying.

> On Aug 9, 2018, at 12:06 PM, Manoj Khangaonkar <[email protected]> wrote:
> 
> Hi,
> 
> Yes , if you don'nt call poll within the configured timeouts, the broker
> thinks the consumer is gone.
> 
> But increasing the timeout is not a sustainable design.
> 
> In general the code in the consumer poll loop should be very fast and do
> minimal work.
> 
> Any heavy duty work should be done by handing of to a thread pool.
> 
> What is happening is that the partitions for this consumer are assigned to
> another.
> 
> If reading too many messages too fast becomes an issue, You can consider
> using the pause and resume API to pause the consumer.
> 
> In some special cases, you might consider manually assigning partitions to
> the consumer.
> 
> 
> regards
> 
> 
> On Wed, Aug 8, 2018 at 1:30 PM, Moiz Raja (moraja) <[email protected]
>> wrote:
> 
>> Hi All,
>> 
>> I have an issue with the consumer getting kicked out of the group possibly
>> due to other issues going on in the system. The issue is detailed here
>> https://stackoverflow.com/questions/51754794/how-to-
>> reinstate-a-kafka-consumer-which-has-been-kicked-out-of-the-group
>> 
>> Any help with this issue would be appreciated.
>> 
>> Regards,
>> -Moiz
>> 
> 
> 
> 
> -- 
> http://khangaonkar.blogspot.com/

Reply via email to