Skip to content

feat: Added compatibilityPartitioner.#263

Merged
ShogunPanda merged 1 commit intomainfrom
alternative-partitioner
Apr 3, 2026
Merged

feat: Added compatibilityPartitioner.#263
ShogunPanda merged 1 commit intomainfrom
alternative-partitioner

Conversation

@ShogunPanda
Copy link
Copy Markdown
Contributor

Fixes #121.

Signed-off-by: Paolo Insogna <paolo@cowtech.it>
@ShogunPanda ShogunPanda requested a review from mcollina April 3, 2026 13:46
_: MessageToProduce<Key, Value, HeaderKey, HeaderValue>,
key?: Buffer | undefined
): number {
return Buffer.isBuffer(key) ? murmur2(key) >>> 0 : 0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit unconvinced on this logic. The original code did not seem to handle anything but buffers.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still does, key is just a buffer.
The problem is that not to break the existing contract for Partitioner I needed to wrap as a second argument.

Copy link
Copy Markdown
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ShogunPanda ShogunPanda merged commit b2b261e into main Apr 3, 2026
22 checks passed
@ShogunPanda ShogunPanda deleted the alternative-partitioner branch April 3, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default partitioning logic is not compatible with Java and kafkajs libraries

2 participants