Kafkajs: Breaking changes when updating from version 1.8 to 1.9.3

Created on 30 Jun 2019  路  1Comment  路  Source: tulios/kafkajs

Not sure when they were introduced but there are breaking changes between kafkajs version 1.8 and 1.9.3 when using Typescript (we're using TypeScript 3.5.2):

Examples include:

  1. Producing messages: key and value no longer accept a string but need a buffer instead
  2. Deleting a topic: now requires a timeout parameter
  3. Consuming messages: ConsumerEachMessagePayload no longer exists.

I'd like to suggest increasing the major version number if there are breaking changes in the future. Obviously, if semantic versioning is not being used for this repo, then please ignore this suggestion. Personally I have a preference for semantic versioning, though, as it helps with managing dependencies.

Thank you and keep up the great work!

Most helpful comment

Hi @ManfredLange, we use semver. The typescript definitions are still a bit messy as I assumed the original contribution was build up on top of @types/kafkajs, but it wasn't. It was also hard to review, but I consider your points bugs, and I have been working to fix them. I will work on another patch to address the incompatibilities, the code on 1.9 is 100% compatible with the previous versions and soon will reach a good state with the typescript definitions.

Thanks for the report.

>All comments

Hi @ManfredLange, we use semver. The typescript definitions are still a bit messy as I assumed the original contribution was build up on top of @types/kafkajs, but it wasn't. It was also hard to review, but I consider your points bugs, and I have been working to fix them. I will work on another patch to address the incompatibilities, the code on 1.9 is 100% compatible with the previous versions and soon will reach a good state with the typescript definitions.

Thanks for the report.

Was this page helpful?
0 / 5 - 0 ratings