IBM / sarama

Sarama is a Go library for Apache Kafka.
MIT License
11.56k stars 1.76k forks source link

Sarama doesn't currently negotiate the protocol ApiKey versions to use #1916

Open ppatierno opened 3 years ago

ppatierno commented 3 years ago

If I got it correctly, the Sarama client doesn't have any kind of API version negotiation in order to handle backward compatibility automatically (as it happens in Java clients). It seems to rely on the Version specified in the configuration. Even if the Broker struct provides an ApiVersions function, it seems to be not used by the client to get the min/max version for each API key and then handling the communication with the broker based on those versions. Is there any specific reason for that?

dnwe commented 3 years ago

@ppatierno hey Paolo — no it's purely that Sarama started around Kafka 0.8 and earlier and pre-dated the ApiVersions capabililties and nobody has especially had time to get around to implementing it

I keep meaning to circle back to it, as I agree it would be a much improved out-of-the-box experience and also probably make things less error prone

ppatierno commented 3 years ago

@dnwe thanks for the update!

github-actions[bot] commented 1 year ago

Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur. Please check if the main branch has already resolved the issue since it was raised. If you believe the issue is still valid and you would like input from the maintainers then please comment to ask for it to be reviewed.

dnwe commented 1 year ago

As mentioned, this is planned for a future v2 version. The plumbing is in-place and I have experimented with some drafts in the past. Marking the issue as stale/exempt