Unintentional Breaking Change to TopicPartitionOffset in 2.1
See original GitHub issueDescription
Version 2.1 (specifically commit 9826d794) introduced a breaking change (looks unintentional as you would think optional parameters would be non-breaking but they aren’t). This is causing my applications that reference a library that uses a library that uses Confluent.Kafka to break when the entry app tries to upgrade to the latest Confluent.Kafka.
Library -> Confluent.Kafka 2.0.2 App -> Confluent.Kafka 2.1.1
Exception:
RLI.EventMessaging.Client.ClientHandler[0]
Method not found: ‘Void Confluent.Kafka.TopicPartitionOffset…ctor(System.String, Confluent.Kafka.Partition, Confluent.Kafka.Offset)’.
System.MissingMethodException: Method not found: ‘Void Confluent.Kafka.TopicPartitionOffset…ctor(System.String, Confluent.Kafka.Partition, Confluent.Kafka.Offset)’.
at Confluent.Kafka.Consumer2.Consume(Int32 millisecondsTimeout) at RLI.EventMessaging.Kafka.Client.KafkaClient
3.<>c__DisplayClass31_01.<ConsumeWithRetryAsync>b__0() in C:\code\RLI.EventMessaging\src\RLI.EventMessaging.Kafka\Client\KafkaClient.cs:line 421 at System.Threading.Tasks.Task
1.InnerInvoke()
How to reproduce
Library -> Confluent.Kafka 2.0.2 App -> Confluent.Kafka 2.1.1
Kafka Version: Any Client Configuration: Basic OS: Linux (probably windows too) Critical: No Broker Logs: Can’t get that far
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 i.
- Provide broker log excerpts.
- Critical issue. KafkaBreakTest.zip
Issue Analytics
- State:
- Created 4 months ago
- Reactions:2
- Comments:7 (3 by maintainers)
Top GitHub Comments
The issue is completely reasonable: the breaking change of the public API must not happen with the increase of the minor version, according to the Semantic Versioning 2.0.0. By changing the constructor signature, you broke a lot of packages with dependencies on Confluent.Kafka v2.*
Considering that the solution to the problem is very simple and consists of literally replacing the constructor with an optional parameter with several constructors, this must be done.
I think the ticket should be reopened.