Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List of upcoming breaking changes #1013

Open
9 of 10 tasks
Nevon opened this issue Jan 29, 2021 · 3 comments
Open
9 of 10 tasks

List of upcoming breaking changes #1013

Nevon opened this issue Jan 29, 2021 · 3 comments
Labels
Discussion Discussions with maintainers and community members

Comments

@Nevon
Copy link
Collaborator

Nevon commented Jan 29, 2021

For many years now, we have never made a breaking change to KafkaJS (at least not intentionally), which is great for our users in the short term, but in the long term it also means we accumulate cruft and some slightly awkward APIs.

The intention of this issue is to collect all of the things that we have said we want to change in a single major version, so that when we feel that we have accumulated enough things we can actually put together a project to do them.

Planned breaking changes

Please leave a comment if you find more changes that should be on this list.

@Nevon Nevon added the Discussion Discussions with maintainers and community members label Jan 29, 2021
@Nevon Nevon pinned this issue Jan 29, 2021
@ankon
Copy link
Contributor

ankon commented Jan 29, 2021

Remove typo-type:

kafkajs/types/index.d.ts

Lines 729 to 730 in addcd6f

// TODO: Remove with 2.x
export type TopicPartitionOffsetAndMedata = TopicPartitionOffsetAndMetadata

@t-d-d
Copy link
Contributor

t-d-d commented Feb 14, 2021

Switch default producer partitioner to JavaCompatiblePartitioner. #358

I realise that changing this has issues as it would cause problems for users that upgrade kafkajs version for their current apps. But as-is there are also issues when interacting with Java (or other) clients. We actually recently got bitten by this in production after moving to a new Kafka cluster where topics had been mirrored across via MirrorMaker (i.e. the Java producer.)

One option could be to not have a default partitioner but require one to be specified. Not a nice API but maybe it could be like that through the betas or for one dot version?

@Nevon
Copy link
Collaborator Author

Nevon commented May 2, 2022

Pushed a branch where I removed the topic: string argument from consumer.subscribe, which is replaced by topics: string[] but I'm waffling back and forth on whether or not it's a good change. The amount of complexity to support both is not that much, since we're pretty much just checking that we have one of the two arguments and then converting from string to string[] if needed. It does feel awkward to do consumer.subscribe({ topic: [topic] }), which might be the more common case. https://github.com/tulios/kafkajs/compare/remove-topic-from-subscribe?expand=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Discussions with maintainers and community members
Projects
None yet
Development

No branches or pull requests

3 participants