I noticed that stream app consumes a lot of cpu if kafka is not accessible. It looks like confluent consumer ignores "timeout" parameter after throwing first "KafkaException" and returns 0 records immediately. That causes an infinite loop without any pauses.
I experimented a bit and it seems that upgrading "confluent-kafka-dotnet" package to the latest version changes the situation, but not very significantly. Instead of immediately raising CPU consumption we get the same effect in 3-5-10 minutes.
Description
I noticed that stream app consumes a lot of cpu if kafka is not accessible. It looks like confluent consumer ignores "timeout" parameter after throwing first "KafkaException" and returns 0 records immediately. That causes an infinite loop without any pauses.
I experimented a bit and it seems that upgrading "confluent-kafka-dotnet" package to the latest version changes the situation, but not very significantly. Instead of immediately raising CPU consumption we get the same effect in 3-5-10 minutes.
NuGet version: 1.1.5. Kafka version: latest confluent kafka
How to reproduce
1) Start kafka 2) Start application 3) Stop kafka 4) Wait a bit
I believe it should have the same behavior for any topology
Configuration:
Checklist
Please provide the following information: