showuon commented on PR #13270:
URL: https://github.com/apache/kafka/pull/13270#issuecomment-1435470639

   >  In general I think if the background thread dies for whatever the reason 
we should consider the following actions in precedence:
       1. Make sure the consumer now falls into an abnormal state which would 
not return data, and would not try to tie up the caller thread. This is also 
for notifying the user.
       2. Try to "selfheal" by re-creating the thread (we do not need to do it 
in this PR, just laying out the ground here), in order to bring the consumer 
back to normal state.
       3. If we cannot selfheal the consumer and it simply becomes useless, let 
the consumer to throw an exception for any API calls so that the caller thread 
would then go ahead and recreate a brand new consumer.
   
   Good suggestion. I was thinking we can directly throw exception in 
`timeToNextHeartbeat` method when heartbeatThread is failed. That should be 
good enough. WDYT?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to