You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Kafka consumer leaves group after 5 mins (#113)
* Fix: Kafka consumer leaves group after 5 mins
Motivation:
This PR fixes issue #110.
`KakfaConsumer`: by polling the `rd_kafka_queue_get_main` queue instead of the `rd_kafka_queue_get_consumer` queue,
the timer for `max.poll.interval.ms` did not get reset which eventually
resulted in a timeout despite polling. (See [`librdkafka`
documentation](https://docs.confluent.io/platform/current/clients/librdkafka/html/rdkafka_8h.html#acacdb55ae7cb6abfbde89621e512b078))
Modifications:
* `RDKafkaClient`:
* rename `mainQueue` to `queue`
* use `rd_kafka_queue_get_consumer` instead of
`rd_kafka_queue_get_main` for `KakfaConsumer` clients
-> this will reset the timer for `max.poll.interval.ms` so that
the consumer does not time out despite polling
* invoke `rd_kafka_queue_destroy(self.queue)` on
`RDKafkaClient.deinit` to loose reference to queue
* Review blindspot
Modifications:
* update comment at invocation of `RDKafkaClient.pollSetConsumer`
* don't fail softly when `rd_kafka_queue_get_consumer` returns `nil`
* don't create new reference to consumer queue in
`RDKafkaClient.consumerClose()`
0 commit comments