aiokafka icon indicating copy to clipboard operation
aiokafka copied to clipboard

Fetch consumer's committed offsets with metadata

Open tvainika opened this issue 3 years ago • 0 comments

Describe the solution you'd like

Currently consumer.committed() returns offset number. However Kafka stores optional metadata with committed offsets with metadata in struct OffsetAndMetadata, and the method committed() simply returns only numeric offset.

It should be possible to fetch committed offsets with metadata via aiokafka too without tinkering internals. Either additional API method should be added, or flag to existing method (returning different typed value).

Additional context

At least kafka-python (see the implementation) has additional flag in similar method to return committed offsets with metadata.

tvainika avatar Sep 07 '22 07:09 tvainika