question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consumer leaves group after inactivity

See original GitHub issue

Description

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:closed
  • Created 4 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mlapagliacommented, Jun 25, 2019

This ended up being our incorrect handling of ConsumeException, try to access a field that didn’t exist.

0reactions
mhowlettcommented, May 16, 2019

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kafka Consumer Leaving the Consumer Group
Kafka Consumer Leaving the Consumer Group · Happy case, when all the downstream dependencies are working fine, no problem. · duplicate data ...
Read more >
Kafka Consumer Group Rebalance (1 of 2) | by Rob Golder
When Consumer A eventually completes its poll and rejoins the consumer group, a further rebalance is triggered, and again all processing stops ...
Read more >
Apache Kafka Consumer and Consumer Groups
Thus, Consumer 3 will remain in an inactive state until any of the active consumer leaves. Kafka Consumer and Consumer Groups. Note: In...
Read more >
Troubleshoot continuous rebalancing of your Amazon MSK ...
When a consumer can't reach the cluster, the group coordinator removes the consumer from the consumer group. This process initiates a rebalancing event...
Read more >
What happens when a new consumer joins the group in Kafka?
It might be due to the inactivity, or the group is being migrated to different group coordinator.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found