shotover / shotover-proxy

L7 data-layer proxy
https://docs.shotover.io
Apache License 2.0
83 stars 16 forks source link

Fix NOT_COORDINATOR warnings for Kafka consumer offset commit requests #1693

Closed justinweng-instaclustr closed 1 month ago

justinweng-instaclustr commented 1 month ago

This PR fixes the NOT_COORDINATOR warning when Kafka consumers try to commit offsets. It's fixed by routing the OffsetCommit requests to the group coordinator in the KafkaSinkCluster method route_requests().

It also adds a new Kafka integration test case produce_consume_commit_offsets_partitions1 which calls commit_sync(&offsets) to commit the offset after a valid consume, and calls committed to verify the offset has been successfully committed (refs: Kafka Java driver commitSync(), Kafka Java driver committed(), Kafka C++ driver commit(), Kafka C++ driver committed_offsets()).

commit_sync was chosen over commit_async due to the following reasons:

Closes #1687

codspeed-hq[bot] commented 1 month ago

CodSpeed Performance Report

Merging #1693 will not alter performance

Comparing justinweng-instaclustr:1687-kafka-consumers-seeing-not_coordinator-warnings (9fef022) with main (6ec2022)

Summary

✅ 39 untouched benchmarks