question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unintentional Breaking Change to TopicPartitionOffset in 2.1

See original GitHub issue

Description

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.KafkaClient3.<>c__DisplayClass31_01.<ConsumeWithRetryAsync>b__0() in C:\code\RLI.EventMessaging\src\RLI.EventMessaging.Kafka\Client\KafkaClient.cs:line 421 at System.Threading.Tasks.Task1.InnerInvoke()

How to reproduce

KafkaBreakTest.zip

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:closed
  • Created 4 months ago
  • Reactions:2
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
rising-4cecommented, Jun 26, 2023

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.

3reactions
rising-4cecommented, Jun 26, 2023

I think the ticket should be reopened.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kafka Streams Upgrade Guide
This new method efficiently closes the stream permanently by forcing the member to leave the consumer group. Streams API changes in Confluent Platform...
Read more >
Kafka 2.1 Documentation
This facility helps solve the hard problems this type of application faces: handling out-of-order data, reprocessing input as code changes, performing stateful ...
Read more >
Class: Karafka::Connection::Client
Marks a given message as consumed and commits the offsets in a blocking way. #pause(topic, partition, offset) ⇒ Object. Pauses given partition and...
Read more >
Using AMQ Streams on RHEL
Dynamically change logging levels for Kafka broker loggers ... Configure and manage a deployment of AMQ Streams 2.1 on Red Hat Enterprise ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found