ah- / rdkafka-dotnet

C# Apache Kafka client
Other
242 stars 73 forks source link

Processing Messaging for extended period of time, kick me out of consumer group? #129

Open bkim54 opened 7 years ago

bkim54 commented 7 years ago

Hi,

I am using the EventConsumer and am receiving messages via the EventConsumer.OnMessage handler. I was wondering if I process a given message for an extended period of time, will I block the ConsumerPoll from being called? And therefore be kicked out of the consumer group, forcing a rebalance?

According to librdkafka I need to call this method at regular intervals (Also according to the official java client, we need to call poll for consumers regularly to send heartbeats to the CG leader).

According to the code a new consumer is created via Task.Factory.StartNew and then the onMessage handler is invoked with the message. If my onMessage handler does not return for an extended period of time, will I block the poll from sending a heartbeat to the CG leader?