Consumer leaves group after inactivity
See original GitHub issueDescription
We are using the v1.0.0 library with an asp.net core microservice in a Linux container running on AWS ECS. We are seeing this issue when using Confluent Cloud Professional. When the consumer doesn’t receive any messages it will disconnect from the broker and never reconnect. After the client is manually restarted it will process messages correctly. We are noticing the following log message when the consumer stops processing messages:%4|1557493935.201|MAXPOLL|rdkafka#consumer-3| [thrd:main]: Application maximum poll interval (300000ms) exceeded by 330ms (adjust max.poll.interval.ms for long-running message processing): leaving group
Here is a complete log: cloudwatch.log
Let me know what debug statements would be most helpful for this situation
How to reproduce
Using the following test project, add the appropriate credentials to startup.cs
, start the client and let it run without publishing any events to the topic. After anywhere from 5 minutes to 3 hours the debug message about leaving the group will appear, and the consumer will stop processing messages.
Checklist
Please provide the following information:
- A complete (i.e. we can run it), minimal program demonstrating the problem. No need to supply a project file.
- Confluent.Kafka nuget version.
- Apache Kafka version.
- Client configuration.
- Operating system.
- Provide logs (with “debug” : “…” as necessary in configuration).
- Provide broker log excerpts.
- Critical issue.
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (7 by maintainers)
Top GitHub Comments
This ended up being our incorrect handling of
ConsumeException
, try to access a field that didn’t exist.Do you mean you are seeing:
an exception occurred An exception has been thrown: Local: Broker transport failure
?the relevant code is here: https://github.com/confluentinc/confluent-kafka-dotnet/blob/master/src/Confluent.Kafka/Consumer.cs#L662
to get that error code from the consume method, the ConsumerPoll method needs to return a msg with an err, and the only way that’s exposed as a
ConsumeException
.is the exception originating from somewhere else?